ansible-playbook
Description
the tool to run Ansible playbooks, which are a configuration and multinode deployment system.See the project home page () for more information.
—ask-sudo-pass
- ask for sudo password (deprecated, use become)
—become-method
<BECOME_METHOD>
- privilege escalation method to use (default=sudo), valid choices: [ sudo | su | pbrun | pfexec | doas | dzdo | ksu | runas | pmrun | enable | machinectl ]
—flush-cache
- clear the fact cache for every host in inventory
—list-hosts
- outputs a list of matching hosts; does not execute anything else
—list-tasks
- list all tasks that would be executed
- specify extra arguments to pass to scp only (e.g. -l)
—sftp-extra-args
<SFTP_EXTRA_ARGS>
- specify extra arguments to pass to sftp only (e.g. -f, -l)
—ssh-common-args
<SSH_COMMON_ARGS>
- specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
—start-at-task
<START_AT_TASK>
- start the playbook at the task matching this name
—syntax-check
- perform a syntax check on the playbook, but do not execute it
—vault-password-file
- vault password file
-C
,
—check
- don’t make any changes; instead, try to predict some of the changes that may occur
-D
,
—diff
- when changing (small) files and templates, show the differences in those files; works great with –check
-K
,
—ask-become-pass
- ask for privilege escalation password
-M
,
—module-path
- prepend colon-separated path(s) to module library (default=[‘/home/jenkins/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’])
-R
<SU_USER>
,
—su-user
<SU_USER>
-T
<TIMEOUT>
,
—timeout
<TIMEOUT>
- override the connection timeout in seconds (default=10)
-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
-i
,
—inventory
,
—inventory-file
- specify inventory host path or comma separated host list. –inventory-file is deprecated
-k
,
—ask-pass
- ask for connection password
-s
,
—sudo
- run operations with sudo (nopasswd) (deprecated, use become)
-u
<REMOTE_USER>
,
—user
<REMOTE_USER>
- connect as this user (default=None)
Environment
The following environment variables may be specified.
– Override the default ansible config file
/etc/ansible/ansible.cfg
– Config file, used if present
~/.ansible.cfg
– User config file, overrides the default config if present
Author
Ansible was originally written by Michael DeHaan.
Copyright © 2017 Red Hat, Inc | Ansible.
Ansible is released under the terms of the GPLv3 License.
See also
ansible(1), ansible-config(1), ansible-console(1), ansible-doc(1), ansible-galaxy(1), ansible-inventory(1), ansible-playbook(1), ansible-pull(1), ansible-vault(1),