Example - Running a Playbook
Let’s say you have a playbook called web-app.yml
that you wish to run on one your VMs. Using the dynamic inventory, you can do this:
ansible-playbook -i cloudshare-inventory.py all web-app.yml
This will run the playbook on all your VMs. You’d probably want to limit it to a subset of your VMs, and you can use --limit
for that and pass it a specific environment name, a pattern of VM names, etc.
Comments
0 comments
Article is closed for comments.