Ansible – page

Ansible uses ssh to deploy software to one, several or a group of hosts. It can do other things as well as deploy software.

Here’s some example of how to run an ansible playbook:

ansible-playbook ./tomcat.yml -i ./tomcat-hosts –limit tomcat01 –ask-become-pass -vvvv

ansible-playbook ./tomcat.yml  -e tomcat_version=7 -i ./inventory/tomcat-hosts –limit tomcat02 –user tomcat –ask-pass –ask-become-pass -vvvv

You can limit the hosts using –limit
–check can be used to “Dry run” a playbook, ensuring not changes are made. This does have it’s limitations, for example, if you play installs a package, –check might fail because the playbook will check if the package is installed and obviously as it’s a dry run, it’s not installing anything.
–ask-become-pass asks you for the sudo password
–user let you run as a specified user
–ask-pass asks you for the password
-e allow you to pass extra variables
-i allows you to specify an inventory file