1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Update README.md

This commit is contained in:
Michael DeHaan 2012-03-06 08:56:51 -05:00
parent 7cb6ce6613
commit 498a4c8056

View file

@ -120,7 +120,8 @@ To just transfer a file directly to many different servers:
To use templating, first run the setup module to put the template variables you would To use templating, first run the setup module to put the template variables you would
like to use on the remote host. Then use the template module to write the like to use on the remote host. Then use the template module to write the
files using the templates. Templates are written in Jinja2 format. files using the templates. Templates are written in Jinja2 format. Playbooks
(covered below) will run the setup module for you, making this even simpler.
> ansible webservers -m setup -a "favcolor=red ntp_server=192.168.1.1" > ansible webservers -m setup -a "favcolor=red ntp_server=192.168.1.1"
> ansible webservers -m template -a "src=/srv/motd.j2 dest=/etc/motd" > ansible webservers -m template -a "src=/srv/motd.j2 dest=/etc/motd"
@ -154,9 +155,11 @@ Playbooks
Playbooks are a completely different way to use ansible and are particularly awesome. Playbooks are a completely different way to use ansible and are particularly awesome.
They are the basis for a really simple configuration management system, unlike They are the basis for a really simple configuration management and deployment system, unlike
any that already exist, and one that is very well suited to deploying complex any that already exist, and one that is very well suited to deploying complex
multi-machine applications. multi-machine applications. While you might run the main ansible program for ad-hoc tasks,
playbooks are more likely to be kept in source control and used to push out your configuration
or assure the configurations of your remote systems are in spec.
An example showing a small playbook: An example showing a small playbook: