1ANSIBLE-PLAYBOOK(1) System administration commands ANSIBLE-PLAYBOOK(1)
2
3
4
6 ansible-playbook - Runs Ansible playbooks, executing the defined tasks
7 on the targeted hosts.
8
10 ansible-playbook [options] playbook.yml [playbook2 ...]
11
13 the tool to run Ansible playbooks, which are a configuration and
14 multinode deployment system. See the project home page (‐
15 https://docs.ansible.com) for more information.
16
18 --ask-vault-pass
19 ask for vault password
20
21 --become-method 'BECOME_METHOD'
22 privilege escalation method to use (default=%default), use ansi‐
23 ble-doc -t become -l to list valid choices.
24
25 --become-user 'BECOME_USER'
26 run operations as this user (default=root)
27
28 --flush-cache
29 clear the fact cache for every host in inventory
30
31 --force-handlers
32 run handlers even if a task fails
33
34 --list-hosts
35 outputs a list of matching hosts; does not execute anything else
36
37 --list-tags
38 list all available tags
39
40 --list-tasks
41 list all tasks that would be executed
42
43 --private-key, --key-file
44 use this file to authenticate the connection
45
46 --scp-extra-args 'SCP_EXTRA_ARGS'
47 specify extra arguments to pass to scp only (e.g. -l)
48
49 --sftp-extra-args 'SFTP_EXTRA_ARGS'
50 specify extra arguments to pass to sftp only (e.g. -f, -l)
51
52 --skip-tags
53 only run plays and tasks whose tags do not match these values
54
55 --ssh-common-args 'SSH_COMMON_ARGS'
56 specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
57
58 --ssh-extra-args 'SSH_EXTRA_ARGS'
59 specify extra arguments to pass to ssh only (e.g. -R)
60
61 --start-at-task 'START_AT_TASK'
62 start the playbook at the task matching this name
63
64 --step
65 one-step-at-a-time: confirm each task before running
66
67 --syntax-check
68 perform a syntax check on the playbook, but do not execute it
69
70 --vault-id
71 the vault identity to use
72
73 --vault-password-file
74 vault password file
75
76 --version
77 show program's version number, config file location, configured mod‐
78 ule search path, module location, executable location and exit
79
80 -C, --check
81 don't make any changes; instead, try to predict some of the changes
82 that may occur
83
84 -D, --diff
85 when changing (small) files and templates, show the differences in
86 those files; works great with --check
87
88 -K, --ask-become-pass
89 ask for privilege escalation password
90
91 -M, --module-path
92 prepend colon-separated path(s) to module library (default=~/.ansi‐
93 ble/plugins/modules:/usr/share/ansible/plugins/modules)
94
95 -T 'TIMEOUT', --timeout 'TIMEOUT'
96 override the connection timeout in seconds (default=10)
97
98 -b, --become
99 run operations with become (does not imply password prompting)
100
101 -c 'CONNECTION', --connection 'CONNECTION'
102 connection type to use (default=smart)
103
104 -e, --extra-vars
105 set additional variables as key=value or YAML/JSON, if filename
106 prepend with @
107
108 -f 'FORKS', --forks 'FORKS'
109 specify number of parallel processes to use (default=5)
110
111 -h, --help
112 show this help message and exit
113
114 -i, --inventory, --inventory-file
115 specify inventory host path or comma separated host list. --inven‐
116 tory-file is deprecated
117
118 -k, --ask-pass
119 ask for connection password
120
121 -l 'SUBSET', --limit 'SUBSET'
122 further limit selected hosts to an additional pattern
123
124 -t, --tags
125 only run plays and tasks tagged with these values
126
127 -u 'REMOTE_USER', --user 'REMOTE_USER'
128 connect as this user (default=None)
129
130 -v, --verbose
131 verbose mode (-vvv for more, -vvvv to enable connection debugging)
132
134 The following environment variables may be specified.
135
136 ANSIBLE_CONFIG -- Specify override location for the ansible config file
137
138 Many more are available for most options in ansible.cfg
139
140 For a full list check https://docs.ansible.com/. or use the ansi‐
141 ble-config command.
142
144 /etc/ansible/ansible.cfg -- Config file, used if present
145
146 ~/.ansible.cfg -- User config file, overrides the default config if
147 present
148
149 ./ansible.cfg -- Local config file (in current working directory)
150 assumed to be 'project specific' and overrides the rest if present.
151
152 As mentioned above, the ANSIBLE_CONFIG environment variable will over‐
153 ride all others.
154
156 Ansible was originally written by Michael DeHaan.
157
159 Copyright © 2018 Red Hat, Inc | Ansible. Ansible is released under the
160 terms of the GPLv3 license.
161
163 ansible (1), ansible-config (1), ansible-console (1), ansible-doc [22m(1),
164 ansible-galaxy [22m(1), ansible-inventory [22m(1), ansible-pull [22m(1), ansi‐
165 ble-vault (1)
166
167 Extensive documentation is available in the documentation site: <‐
168 https://docs.ansible.com>. IRC and mailing list info can be found in
169 file CONTRIBUTING.md, available in: <‐
170 https://github.com/ansible/ansible>
171
172
173
174
175Ansible 2.8.1 ANSIBLE-PLAYBOOK(1)