Professional Documents
Culture Documents
-b, --become
run operations with become (does not imply password prompting)
-e, --extra-vars
set additional variables as key=value or YAML/JSON, if filename prepend with @
-h, --help
show this help message and exit
-k, --ask-pass
ask for connection password
-o, --one-line
condense output
-s, --sudo
run operations with sudo (nopasswd) (deprecated, use become)
-v, --verbose
verbose mode (-vvv for more, -vvvv to enable connection debugging)
Why use ad hoc commands?
ad hoc commands are great for tasks you repeat rarely.
For example, if you want to power off all the machines for
mintainance, you could execute a quick one-liner in Ansible
without writing a playbook. An ad hoc command looks like
this: