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

NAME

6       ansible  -  Define  and  run  a single task 'playbook' against a set of
7       hosts
8

SYNOPSIS

10       usage:  ansible  [-h]  [--version]  [-v]  [-b]   [--become-method   BE‐
11       COME_METHOD]
12              [--become-user  BECOME_USER]  [-K] [-i INVENTORY] [--list-hosts]
13              [-l SUBSET] [-P POLL_INTERVAL] [-B SECONDS] [-o] [-t TREE]  [-k]
14              [--private-key  PRIVATE_KEY_FILE]  [-u  REMOTE_USER] [-c CONNEC‐
15              TION]   [-T   TIMEOUT]    [--ssh-common-args    SSH_COMMON_ARGS]
16              [--sftp-extra-args  SFTP_EXTRA_ARGS]  [--scp-extra-args  SCP_EX‐
17              TRA_ARGS]   [--ssh-extra-args   SSH_EXTRA_ARGS]   [-C]   [--syn‐
18              tax-check]   [-D]   [-e   EXTRA_VARS]   [--vault-id   VAULT_IDS]
19              [--ask-vault-pass | --vault-password-file  VAULT_PASSWORD_FILES]
20              [-f  FORKS]  [-M  MODULE_PATH] [--playbook-dir BASEDIR] [-a MOD‐
21              ULE_ARGS] [-m MODULE_NAME] pattern
22

DESCRIPTION

24       is an extra-simple tool/framework/API for doing 'remote things'.   this
25       command allows you to define and run a single task 'playbook' against a
26       set of hosts
27

COMMON OPTIONS

29          host pattern
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       --list-hosts
42          outputs a list of matching hosts; does not execute anything else
43
44       --playbook-dir 'BASEDIR'
45          Since  this  tool  does  not use playbooks, use this as a substitute
46          playbook directory.This sets the relative path for many features in‐
47          cluding roles/ group_vars/ etc.
48
49       --private-key 'PRIVATE_KEY_FILE', --key-file 'PRIVATE_KEY_FILE'
50          use this file to authenticate the connection
51
52       --scp-extra-args 'SCP_EXTRA_ARGS'
53          specify extra arguments to pass to scp only (e.g. -l)
54
55       --sftp-extra-args 'SFTP_EXTRA_ARGS'
56          specify extra arguments to pass to sftp only (e.g. -f, -l)
57
58       --ssh-common-args 'SSH_COMMON_ARGS'
59          specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
60
61       --ssh-extra-args 'SSH_EXTRA_ARGS'
62          specify extra arguments to pass to ssh only (e.g. -R)
63
64       --syntax-check
65          perform a syntax check on the playbook, but do not execute it
66
67       --vault-id
68          the vault identity to use
69
70       --vault-password-file
71          vault password file
72
73       --version
74          show program's version number, config file location, configured mod‐
75          ule search path, module location, executable location and exit
76
77       -B 'SECONDS', --background 'SECONDS'
78          run asynchronously, failing after X seconds (default=N/A)
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       -P 'POLL_INTERVAL', --poll 'POLL_INTERVAL'
96          set the poll interval if using -B (default=15)
97
98       -T 'TIMEOUT', --timeout 'TIMEOUT'
99          override the connection timeout in seconds (default=10)
100
101       -a 'MODULE_ARGS', --args 'MODULE_ARGS'
102          module arguments
103
104       -b, --become
105          run operations with become (does not imply password prompting)
106
107       -c 'CONNECTION', --connection 'CONNECTION'
108          connection type to use (default=smart)
109
110       -e, --extra-vars
111          set  additional  variables  as  key=value  or YAML/JSON, if filename
112          prepend with @
113
114       -f 'FORKS', --forks 'FORKS'
115          specify number of parallel processes to use (default=5)
116
117       -h, --help
118          show this help message and exit
119
120       -i, --inventory, --inventory-file
121          specify inventory host path or comma separated host  list.  --inven‐
122          tory-file is deprecated
123
124       -k, --ask-pass
125          ask for connection password
126
127       -l 'SUBSET', --limit 'SUBSET'
128          further limit selected hosts to an additional pattern
129
130       -m 'MODULE_NAME', --module-name 'MODULE_NAME'
131          module name to execute (default=command)
132
133       -o, --one-line
134          condense output
135
136       -t 'TREE', --tree 'TREE'
137          log output to this directory
138
139       -u 'REMOTE_USER', --user 'REMOTE_USER'
140          connect as this user (default=None)
141
142       -v, --verbose
143          verbose mode (-vvv for more, -vvvv to enable connection debugging)
144

ENVIRONMENT

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

FILES

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

AUTHOR

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

SEE ALSO

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