July 2017
Intermediate to advanced
266 pages
6h 36m
English
Now that we have a pretty good understanding of the various knobs that the Ansible command line provides, let's take a look at a few examples of how to use them to enhance the execution of a playbook. The following examples show some basic ways in which Ansible can be leveraged to run:
Example: Run an ad hoc command against an Ansible inventory group and limit the execution of a playbook to a max of 5 simultaneous servers:$ ansible europe -a "whoami" -f 5Example: Execute a playbook against the Europe group as a privileged account (different from the SSH account$ ansible europe -a "/usr/bin/foo" -u username --become [--ask-become-pass]Example: Transfer a local (on the ansible control server) file to a set of ...
Read now
Unlock full access