role-golang/tasks/main.yml
2022-12-11 15:52:27 +01:00

16 lines
398 B
YAML

---
- name: "Check golang version"
ansible.builtin.shell: "go version | cut -d' ' -f 3 | cut -d'o' -f 2"
args:
executable: /bin/bash
register: golang_active_version_sout
changed_when: false
failed_when: false
when: golang_version_check|bool
- name: "Set active version"
set_fact:
golang_active_version: "{{ golang_active_version_sout.stdout }}"
- include_tasks: install.yml