Skip to content

Instantly share code, notes, and snippets.

@markuskont
Created March 17, 2020 12:39
Show Gist options
  • Save markuskont/ad1c55632ec42d3531598a32def44019 to your computer and use it in GitHub Desktop.
Save markuskont/ad1c55632ec42d3531598a32def44019 to your computer and use it in GitHub Desktop.
- name: update go
connection: local
hosts: localhost
vars:
home:
version: 1.14
source: "https://dl.google.com/go/go{{ version }}.linux-amd64.tar.gz"
sha256sum: 08df79b46b0adf498ea9f320a0f23d6ec59e9003660b4c9c1ce8e5e2c6f823ca
tasks:
- name: remove old go install
file:
path: "{{ ansible_env.HOME }}/.local/go/"
state: absent
- name: download and set up new go
unarchive:
src: "{{ source }}"
dest: "{{ ansible_env.HOME }}/.local/"
remote_src: yes
- name: print new go version
command: go version
register: output
- debug:
msg: "{{ output.stdout }}"
- name: update coding tools via neovim
command: nvim +GoUpdateBinaries +qa --headless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment