Useful Ansible commands
Help: [#> ansible --help] Version: [#> ansible --version] #> ansible --version ansible 2.0.0.2 config file = /etc/ansible/ansble.cfg configured module search path = Default w/o overrides Check: [#> ansible foo.yml --check] Inventory: [#> ansible -i 192.x.x.x, x.x.x.x] ListHosts: [#> ansible -list-hosts] OneLine: [#> ansible –-one-line] SyntaxCheck: [#> ansible –-syntax-check] TimeOut: [#> ansible –timeout=X] Verbose: [#> ansible –verbose] 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 5 Example: 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 remote hosts simultaneously $ ansible europe -m copy -a "src=/op...