Ansible playbooks

From Notes_Wiki
Revision as of 14:57, 20 February 2015 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>Ansible|Ansible</yambe:breadcrumb> =Ansible-playbooks= To run ansible-playbooks use: <pre> ansible-playbook -i <hosts-file> <playbook.yaml> </pr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>Ansible|Ansible</yambe:breadcrumb>

Ansible-playbooks

To run ansible-playbooks use:

ansible-playbook -i <hosts-file> <playbook.yaml>

It is also possible to supply values of various variables using -e "var=value" option. Here host names in playbook will get dereferenced from provided hosts file. Trust based ssh should be present between current host and root@<remote-machine> for script to work properly.

Example playbooks: