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  SCP_EX‐
14              TRA_ARGS]  [--ssh-extra-args  SSH_EXTRA_ARGS] [--force-handlers]
15              [--flush-cache]  [-b]  [--become-method  BECOME_METHOD]   [--be‐
16              come-user  BECOME_USER]  [-K]  [-t TAGS] [--skip-tags SKIP_TAGS]
17              [-C] [--syntax-check] [-D]  [-i  INVENTORY]  [--list-hosts]  [-l
18              SUBSET] [-e EXTRA_VARS] [--vault-id VAULT_IDS] [--ask-vault-pass
19              | --vault-password-file  VAULT_PASSWORD_FILES]  [-f  FORKS]  [-M
20              MODULE_PATH]      [--list-tasks]      [--list-tags]     [--step]
21              [--start-at-task START_AT_TASK] playbook [playbook ...]
22

DESCRIPTION

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

COMMON OPTIONS

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

ENVIRONMENT

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

FILES

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

AUTHOR

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

SEE ALSO

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