ansible <command>

Define and run a single Ansible task 'playbook' against a set of hosts

Arguments

NameDescription
commandHost pattern

Options

NameDescription
--ask-vault-passAsk for vault password
--list-hostsOutputs a list of matching hosts; does not execute
--playbook-dir <command>Since this tool does not use playbooks, use this as a substitute playbook directory.This sets the relative path for many features including roles/ group_vars/etc
--syntax-checkPerform a syntax check on the playbook, but do not execute it
--vault-id <command>Specify the vault identity to use
--vault-password-file <command>Specify a vault password file
--versionShow program's version number, config file location, configured module search path, module location and executable location
--background,-B <command>Run asynchronously, failing after specified seconds
--check,-CDon't make any changes; instead, try to predict some of the changes that may occur
--diff,-DWhen changing (small) files and templates, show the differences in those files
--module-path,-M <command>Prepend colon-separated path(s) to module library
--poll,-P <command>Set the poll interval if using -B
--args,-a <command>Specify module arguments
--extra-vars,-e <command>Set additional variables as key=value or YAML/JSON, if filename prepend with @
--forks,-f <command>Specify number of parallel processes to use
--help,-hShow help for ansible
--inventory,-i <command>Specify inventory host path or comma separated host list
--limit,-l <command>Limit selected hosts to an additional pattern
--module-name,-m <command>Specify the module name to execute
--one-line,-oCondense output
--tree,-t <command>Log output to specific directory
--verbose,-vEnable verbose mode
-vvvEnable very verbose mode
-vvvvEnable connection debug mode
--become-method <command>Privilege escalation method to use
--become-user <command>Privilege escalation user to use
--ask-become-pass,-KPrompt for privilege escalation password
--become,-bRun operations with become
--private-key,--key-file <command>Use this fole to authenticate the connection
--scp-extra-args <command>Extra arguments to pass to (only) scp
--sftp-extra-args <command>Extra arguments to pass to (only) sftp
-ssh-extra-args <command>Extra arguments to pass to (only) ssh
--ssh-common-args <command>Extra arguments to pass to sftp/scp/ssh
--timeout,-T <command>Override the connection timeout in seconds
--connection,-c <command>Connection type to use
--ask-pass,-kAsk for connection password
--user,-u <command>Connect as this user