1ANSIBLE-PLAYBOOK(1)     System administration commands     ANSIBLE-PLAYBOOK(1)
2
3
4

NAME

6       ansible-playbook  - Runs Ansible playbooks, executing the defined tasks
7       on the targeted hosts.
8

SYNOPSIS

10       usage:  ansible-playbook  [-h]  [--version]  [-v]  [--private-key  PRI‐
11       VATE_KEY_FILE]
12              [-u REMOTE_USER] [-c CONNECTION] [-T TIMEOUT] [--ssh-common-args
13              SSH_COMMON_ARGS] [--sftp-extra-args SFTP_EXTRA_ARGS]  [--scp-ex‐
14              tra-args SCP_EXTRA_ARGS] [--ssh-extra-args SSH_EXTRA_ARGS] [-k |
15              --connection-password-file             CONNECTION_PASSWORD_FILE]
16              [--force-handlers]  [--flush-cache]  [-b]  [--become-method  BE‐
17              COME_METHOD] [--become-user BECOME_USER]  [-K  |  --become-pass‐
18              word-file    BECOME_PASSWORD_FILE]    [-t   TAGS]   [--skip-tags
19              SKIP_TAGS]   [-C]   [--syntax-check]   [-D]    [-i    INVENTORY]
20              [--list-hosts]   [-l   SUBSET]   [-e   EXTRA_VARS]   [--vault-id
21              VAULT_IDS]   [--ask-vault-password    |    --vault-password-file
22              VAULT_PASSWORD_FILES] [-f FORKS] [-M MODULE_PATH] [--list-tasks]
23              [--list-tags] [--step] [--start-at-task START_AT_TASK]  playbook
24              [playbook ...]
25

DESCRIPTION

27       the  tool  to  run  Ansible  playbooks,  which  are a configuration and
28       multinode  deployment  system.   See   the   project   home   page   (‐
29       https://docs.ansible.com) for more information.
30

COMMON OPTIONS

32          Playbook(s)
33
34       --ask-vault-password, --ask-vault-pass
35          ask for vault password
36
37       --become-method 'BECOME_METHOD'
38          privilege  escalation  method to use (default=sudo), use ansible-doc
39          -t become -l to list valid choices.
40
41       --become-password-file 'BECOME_PASSWORD_FILE', --become-pass-file  'BE‐
42       COME_PASSWORD_FILE'
43          Become password file
44
45       --become-user 'BECOME_USER'
46          run operations as this user (default=root)
47
48       --connection-password-file 'CONNECTION_PASSWORD_FILE', --conn-pass-file
49       'CONNECTION_PASSWORD_FILE'
50          Connection password file
51
52       --flush-cache
53          clear the fact cache for every host in inventory
54
55       --force-handlers
56          run handlers even if a task fails
57
58       --list-hosts
59          outputs a list of matching hosts; does not execute anything else
60
61       --list-tags
62          list all available tags
63
64       --list-tasks
65          list all tasks that would be executed
66
67       --private-key 'PRIVATE_KEY_FILE', --key-file 'PRIVATE_KEY_FILE'
68          use this file to authenticate the connection
69
70       --scp-extra-args 'SCP_EXTRA_ARGS'
71          specify extra arguments to pass to scp only (e.g. -l)
72
73       --sftp-extra-args 'SFTP_EXTRA_ARGS'
74          specify extra arguments to pass to sftp only (e.g. -f, -l)
75
76       --skip-tags
77          only run plays and tasks whose tags do not match these values
78
79       --ssh-common-args 'SSH_COMMON_ARGS'
80          specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
81
82       --ssh-extra-args 'SSH_EXTRA_ARGS'
83          specify extra arguments to pass to ssh only (e.g. -R)
84
85       --start-at-task 'START_AT_TASK'
86          start the playbook at the task matching this name
87
88       --step
89          one-step-at-a-time: confirm each task before running
90
91       --syntax-check
92          perform a syntax check on the playbook, but do not execute it
93
94       --vault-id
95          the vault identity to use
96
97       --vault-password-file, --vault-pass-file
98          vault password file
99
100       --version
101          show program's version number, config file location, configured mod‐
102          ule search path, module location, executable location and exit
103
104       -C, --check
105          don't  make any changes; instead, try to predict some of the changes
106          that may occur
107
108       -D, --diff
109          when changing (small) files and templates, show the  differences  in
110          those files; works great with --check
111
112       -K, --ask-become-pass
113          ask for privilege escalation password
114
115       -M, --module-path
116          prepend  colon-separated path(s) to module library (default={{ ANSI‐
117          BLE_HOME ~ "/plugins/modules:/usr/share/ansible/plugins/modules" }})
118
119       -T 'TIMEOUT', --timeout 'TIMEOUT'
120          override the connection timeout in seconds (default=10)
121
122       -b, --become
123          run operations with become (does not imply password prompting)
124
125       -c 'CONNECTION', --connection 'CONNECTION'
126          connection type to use (default=smart)
127
128       -e, --extra-vars
129          set additional variables as  key=value  or  YAML/JSON,  if  filename
130          prepend with @
131
132       -f 'FORKS', --forks 'FORKS'
133          specify number of parallel processes to use (default=5)
134
135       -h, --help
136          show this help message and exit
137
138       -i, --inventory, --inventory-file
139          specify  inventory  host path or comma separated host list. --inven‐
140          tory-file is deprecated
141
142       -k, --ask-pass
143          ask for connection password
144
145       -l 'SUBSET', --limit 'SUBSET'
146          further limit selected hosts to an additional pattern
147
148       -t, --tags
149          only run plays and tasks tagged with these values
150
151       -u 'REMOTE_USER', --user 'REMOTE_USER'
152          connect as this user (default=None)
153
154       -v, --verbose
155          Causes Ansible to print more debug messages. Adding multiple -v will
156          increase the verbosity, the builtin plugins currently evaluate up to
157          -vvvvvv. A reasonable level to start is -vvv,  connection  debugging
158          might require -vvvv.
159

ENVIRONMENT

161       The following environment variables may be specified.
162
163       ANSIBLE_CONFIG -- Specify override location for the ansible config file
164
165       Many more are available for most options in ansible.cfg
166
167       For  a  full  list  check  https://docs.ansible.com/.  or use the ansi‐
168       ble-config command.
169

FILES

171       /etc/ansible/ansible.cfg -- Config file, used if present
172
173       ~/.ansible.cfg -- User config file, overrides  the  default  config  if
174       present
175
176       ./ansible.cfg  --  Local config file (in current working directory) as‐
177       sumed to be 'project specific' and overrides the rest if present.
178
179       As mentioned above, the ANSIBLE_CONFIG environment variable will  over‐
180       ride all others.
181

AUTHOR

183       Ansible was originally written by Michael DeHaan.
184
186       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
187       terms of the GPLv3 license.
188

SEE ALSO

190       ansible (1), ansible-config (1), ansible-console (1), ansible-doc  (1),
191       ansible-galaxy  (1),  ansible-inventory  (1),  ansible-pull  (1), ansi‐
192       ble-vault (1)
193
194       Extensive documentation is available  in  the  documentation  site:  <‐
195       https://docs.ansible.com>.   IRC  and mailing list info can be found in
196       file         CONTRIBUTING.md,         available         in:          <‐
197       https://github.com/ansible/ansible>
198
199
200
201
202Ansible 2.14.1                                             ANSIBLE-PLAYBOOK(1)
Impressum