Advertisement

How to use Ansible variables from the command line

How to use Ansible variables from the command line Make you Playbook more usable by adding in variables that can be populated form the command line. We look at creating users in Ansible 2.9.4 on the Raspberry Pi showing the use of variables and the option -e the ansible-playbook. No longer do we need to hard-code the user name into the playbook. Taking this approach we can also have 2 tasks one to create the user and one to delete the user and using the when clause to determine the state of another variable

Ansible,RCHE,RPi,variables,when,clause,users,delete,create,

Post a Comment

0 Comments