Ansible – Run playbooks

There are many ways to run ansible playbooks including RHAC, AWX, CI/CD pipelines, etc.

To run manually, the following commands are useful:

CommandRuns yaml on hosts…
ansible-playbook vTom.yamlin the global inventory file
ansible-playbook -i hosts.ini vTom.yamlin the hosts.ini inventory file
ansible-playbook –limit ‘web,db’ vTom.yamlin the categories web and db in the global inventory file
ansible-playbook –tags “dev” vTom.yamlin the global inventory file tagged dev
ansible-playbook –become –become-user ansible vTom.yamlin the global inventory file as a user named ansible
ansible-playbook –vault-password-file vault.txt vTom.yamlin the global inventory file using passwords from the vault.txt file