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] [-D] [-i INVENTORY] [--list-hosts]  [-l  SUBSET]
20              [-e  EXTRA_VARS]  [--vault-id VAULT_IDS] [--ask-vault-password |
21              --vault-password-file VAULT_PASSWORD_FILES] [-f FORKS] [-M  MOD‐
22              ULE_PATH] [--syntax-check] [--list-tasks] [--list-tags] [--step]
23              [--start-at-task START_AT_TASK] playbook [playbook ...]
24

DESCRIPTION

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

COMMON OPTIONS

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

INVENTORY

160       Ansible stores the hosts it can potentially operate on in an inventory.
161       This  can  be  an  YAML file, ini-like file, a script, directory, list,
162       etc.    For   additional   options,   see    the    documentation    on
163       https://docs.ansible.com/.
164

ENVIRONMENT

166       The following environment variables may be specified.
167
168       ANSIBLE_INVENTORY  -- Override the default ansible inventory sources
169
170       ANSIBLE_LIBRARY -- Override the default ansible module library path
171
172       ANSIBLE_CONFIG -- Specify override location for the ansible config file
173
174       Many more are available for most options in ansible.cfg
175
176       For  a  full  list  check  https://docs.ansible.com/.  or use the ansi‐
177       ble-config command.
178

FILES

180       /etc/ansible/hosts -- Default inventory file
181
182       /etc/ansible/ansible.cfg -- Config file, used if present
183
184       ~/.ansible.cfg -- User config file, overrides  the  default  config  if
185       present
186
187       ./ansible.cfg  --  Local config file (in current working directory) as‐
188       sumed to be 'project specific' and overrides the rest if present.
189
190       As mentioned above, the ANSIBLE_CONFIG environment variable will  over‐
191       ride all others.
192

AUTHOR

194       Ansible was originally written by Michael DeHaan.
195
197       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
198       terms of the GPLv3 license.
199

SEE ALSO

201       ansible (1), ansible-config (1), ansible-console (1), ansible-doc  (1),
202       ansible-galaxy  (1),  ansible-inventory  (1),  ansible-pull  (1), ansi‐
203       ble-vault (1)
204
205       Extensive documentation is available  in  the  documentation  site:  <‐
206       https://docs.ansible.com>.   IRC  and mailing list info can be found in
207       file         CONTRIBUTING.md,         available         in:          <‐
208       https://github.com/ansible/ansible>
209
210
211
212
213Ansible 2.14.11                                            ANSIBLE-PLAYBOOK(1)
Impressum