role-golang/tasks/main.yml

16 lines
398 B
YAML
Raw Permalink Normal View History

2022-12-11 14:52:27 +00:00
---
- 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