Difference between revisions of "Ansible playbooks"

From Notes_Wiki
m
m
Line 7: Line 7:
</pre>
</pre>
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@&lt;remote-machine&gt; for script to work properly.
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@&lt;remote-machine&gt; for script to work properly.
'''CentOS 7.x playbooks are located at [[CentOS 7.x ansible playbooks]]'''


Example playbooks:
Example playbooks:

Revision as of 03:00, 15 October 2017

<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.

CentOS 7.x playbooks are located at CentOS 7.x ansible playbooks

Example playbooks: