Select Page

Ansible – install golang and set env variables

Playbook nstalls golang of desired version on remote instance. Checks vesion of already installed golang. Based on: https://github.com/jlund/ansible-go/blob/master/tasks/main.yml Run is using: ansible-playbook "yourplaybookname.yaml" -i ./hosts -e...

ansible – built in variables

To see all available variables try command ansible -m setup hostname To get variables from remote instance you have to set “gather_facts: yes” in playbook. Here are some interesting ones: ansible_all_ipv4_addresses – array of IPv4 addresses...