Comments on: How to Download and Use Ansible Galaxy Roles in Ansible Playbook https://www.linuxtechi.com/use-ansible-galaxy-roles-ansible-playbook/ Tue, 21 Apr 2020 07:26:38 +0000 hourly 1 By: Simon H. https://www.linuxtechi.com/use-ansible-galaxy-roles-ansible-playbook/#comment-19820 Tue, 21 Apr 2020 07:26:38 +0000 https://www.linuxtechi.com/?p=8576#comment-19820 To follow SergeMeeuwsen, the value could be set in the playbook. It would look like this:

vi ntpsite.yaml

– name: Configure NTP on CentOS/RHEL/Debian System
become: true
hosts: all
roles:
– {role: bennojoy.ntp}
vars:
ntp_server: [in.pool.ntp.org]

]]>
By: SergeMeeuwsen https://www.linuxtechi.com/use-ansible-galaxy-roles-ansible-playbook/#comment-15428 Sun, 29 Sep 2019 20:05:41 +0000 https://www.linuxtechi.com/?p=8576#comment-15428 You should never change variables in roles files… Change them in your playbook or create group_vars or host_vars directories with the variables that you want to change. Please check the following link that documents the precedence of ansible variables:
‘https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable’

]]>