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] [-k]
11              [--private-key PRIVATE_KEY_FILE] [-u  REMOTE_USER]  [-c  CONNEC‐
12              TION]    [-T    TIMEOUT]   [--ssh-common-args   SSH_COMMON_ARGS]
13              [--sftp-extra-args      SFTP_EXTRA_ARGS]       [--scp-extra-args
14              SCP_EXTRA_ARGS]  [--ssh-extra-args SSH_EXTRA_ARGS] [--force-han‐
15              dlers]  [--flush-cache]  [-b]  [--become-method   BECOME_METHOD]
16              [--become-user   BECOME_USER]   [-K]   [-t   TAGS]  [--skip-tags
17              SKIP_TAGS]   [-C]   [--syntax-check]   [-D]    [-i    INVENTORY]
18              [--list-hosts]   [-l   SUBSET]   [-e   EXTRA_VARS]   [--vault-id
19              VAULT_IDS] [--ask-vault-pass | --vault-password-file VAULT_PASS‐
20              WORD_FILES]   [-f   FORKS]   [-M   MODULE_PATH]   [--list-tasks]
21              [--list-tags] [--step] [--start-at-task START_AT_TASK]  playbook
22              [playbook ...]
23

DESCRIPTION

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

COMMON OPTIONS

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

ENVIRONMENT

148       The following environment variables may be specified.
149
150       ANSIBLE_CONFIG -- Specify override location for the ansible config file
151
152       Many more are available for most options in ansible.cfg
153
154       For a full list  check  https://docs.ansible.com/.  or  use  the  ansi‐
155       ble-config command.
156

FILES

158       /etc/ansible/ansible.cfg -- Config file, used if present
159
160       ~/.ansible.cfg  --  User  config  file, overrides the default config if
161       present
162
163       ./ansible.cfg -- Local  config  file  (in  current  working  directory)
164       assumed to be 'project specific' and overrides the rest if present.
165
166       As  mentioned above, the ANSIBLE_CONFIG environment variable will over‐
167       ride all others.
168

AUTHOR

170       Ansible was originally written by Michael DeHaan.
171
173       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
174       terms of the GPLv3 license.
175

SEE ALSO

177       ansible  (1), ansible-config (1), ansible-console (1), ansible-doc (1),
178       ansible-galaxy (1),  ansible-inventory  (1),  ansible-pull  (1),  ansi‐
179       ble-vault (1)
180
181       Extensive  documentation  is  available  in  the documentation site: <‐
182       https://docs.ansible.com>.  IRC and mailing list info can be  found  in
183       file          CONTRIBUTING.md,         available         in:         <‐
184       https://github.com/ansible/ansible>
185
186
187
188
189Ansible 2.9.2                                              ANSIBLE-PLAYBOOK(1)
Impressum