Perform a playbook
The above sections already have a preliminary understanding of Playbook's syntax, so how do you run a playbook?
This is very simple, here's an example of running playbook in parallel, the level of parallelism is 10
Ansible-playbook Playbook.yml-f 10
Ansible-pull (pull configuration rather than push configuration)
Can we turn the ansible architecture upside down so that the managed node
Do check in to get configuration information instead of pushing configuration information to all managed nodes? Yes, I can.
Ansible-pull is a small script that checkout a repo about configuration instructions from Git.
Then run the Ansible-playbook with this configuration command.
Assuming you load-balance your checkout location, Ansible-pull can basically be infinitely
Executable Ansible-pull--help for detailed help information
There is also a thing called Clever playbook: clever playbook. This can be done by crontab.
To configure Ansible-pull
Tips and Tricks
At the bottom of the Playbook execution output information, you can find information about the managed node. You can also see general failure information, and serious "unreachable" information. The two are counted separately.
If you want to see the output of a successful modules, use--verbose flag (otherwise only the output information will fail to execute). This is available in 0.5 and later versions.
If the Cowsay software package is installed, the output of Ansible playbook has been extensively upgraded. You can try it!
Before executing a playbook, to see which hosts the playbook execution will affect, you can do this:
This article from "Eight Miles" blog, declined reprint!
Ansible Study Notes 7-playbooks implementation of a playbook