install go only if version is different from desired
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
file: go.yml
|
||||
name: _go
|
||||
|
||||
- name: check go version
|
||||
ansible.builtin.command:
|
||||
cmd: "go version"
|
||||
register: r_go_version
|
||||
ignore_errors: true
|
||||
|
||||
- name: install/update go
|
||||
when: "'{{ _go.version }}' not in r_go_version.stdout"
|
||||
block:
|
||||
- name: set go arch
|
||||
ansible.builtin.set_fact:
|
||||
arch: "{{ _go.archmap[ansible_architecture] }}"
|
||||
|
||||
Reference in New Issue
Block a user