An example to show conditional prompting in Ansible
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
group_vars
roles/common/tasks
.gitignore
README.md
fooservers.yml
sample_inventory
site.yml

README.md

Ansible Conditional Prompt Example

How To

  1. Customize sample_inventory to informations of your hosts
  2. If you want to set the password for the foo user, be sure to set the crypted password as mentioned here
  3. Start the play with a command like the following
ansible-playbook -i inventory site.yml -e configure_user=true