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  |  --become-password-file BE‐
13              COME_PASSWORD_FILE] [-i INVENTORY]  [--list-hosts]  [-l  SUBSET]
14              [-P  POLL_INTERVAL]  [-B  SECONDS] [-o] [-t TREE] [--private-key
15              PRIVATE_KEY_FILE] [-u REMOTE_USER] [-c CONNECTION] [-T  TIMEOUT]
16              [--ssh-common-args  SSH_COMMON_ARGS] [--sftp-extra-args SFTP_EX‐
17              TRA_ARGS]  [--scp-extra-args  SCP_EXTRA_ARGS]  [--ssh-extra-args
18              SSH_EXTRA_ARGS]   [-k   |   --connection-password-file   CONNEC‐
19              TION_PASSWORD_FILE] [-C] [--syntax-check] [-D]  [-e  EXTRA_VARS]
20              [--vault-id  VAULT_IDS]  [--ask-vault-password  |  --vault-pass‐
21              word-file  VAULT_PASSWORD_FILES]  [-f  FORKS]  [-M  MODULE_PATH]
22              [--playbook-dir  BASEDIR] [--task-timeout TASK_TIMEOUT] [-a MOD‐
23              ULE_ARGS] [-m MODULE_NAME] pattern
24

DESCRIPTION

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

COMMON OPTIONS

31          host pattern
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       --list-hosts
52          outputs a list of matching hosts; does not execute anything else
53
54       --playbook-dir 'BASEDIR'
55          Since  this  tool  does  not use playbooks, use this as a substitute
56          playbook directory.This sets the relative path for many features in‐
57          cluding roles/ group_vars/ etc.
58
59       --private-key 'PRIVATE_KEY_FILE', --key-file 'PRIVATE_KEY_FILE'
60          use this file to authenticate the connection
61
62       --scp-extra-args 'SCP_EXTRA_ARGS'
63          specify extra arguments to pass to scp only (e.g. -l)
64
65       --sftp-extra-args 'SFTP_EXTRA_ARGS'
66          specify extra arguments to pass to sftp only (e.g. -f, -l)
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       --syntax-check
75          perform a syntax check on the playbook, but do not execute it
76
77       --task-timeout 'TASK_TIMEOUT'
78          set task timeout limit in seconds, must be positive integer.
79
80       --vault-id
81          the vault identity to use
82
83       --vault-password-file, --vault-pass-file
84          vault password file
85
86       --version
87          show program's version number, config file location, configured mod‐
88          ule search path, module location, executable location and exit
89
90       -B 'SECONDS', --background 'SECONDS'
91          run asynchronously, failing after X seconds (default=N/A)
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       -P 'POLL_INTERVAL', --poll 'POLL_INTERVAL'
109          set the poll interval if using -B (default=15)
110
111       -T 'TIMEOUT', --timeout 'TIMEOUT'
112          override the connection timeout in seconds (default=10)
113
114       -a 'MODULE_ARGS', --args 'MODULE_ARGS'
115          The  action's  options  in space separated k=v format: -a 'opt1=val1
116          opt2=val2'
117
118       -b, --become
119          run operations with become (does not imply password prompting)
120
121       -c 'CONNECTION', --connection 'CONNECTION'
122          connection type to use (default=smart)
123
124       -e, --extra-vars
125          set additional variables as  key=value  or  YAML/JSON,  if  filename
126          prepend with @
127
128       -f 'FORKS', --forks 'FORKS'
129          specify number of parallel processes to use (default=5)
130
131       -h, --help
132          show this help message and exit
133
134       -i, --inventory, --inventory-file
135          specify  inventory  host path or comma separated host list. --inven‐
136          tory-file is deprecated
137
138       -k, --ask-pass
139          ask for connection password
140
141       -l 'SUBSET', --limit 'SUBSET'
142          further limit selected hosts to an additional pattern
143
144       -m 'MODULE_NAME', --module-name 'MODULE_NAME'
145          Name of the action to execute (default=command)
146
147       -o, --one-line
148          condense output
149
150       -t 'TREE', --tree 'TREE'
151          log output to this directory
152
153       -u 'REMOTE_USER', --user 'REMOTE_USER'
154          connect as this user (default=None)
155
156       -v, --verbose
157          verbose mode (-vvv for more, -vvvv to enable connection debugging)
158

ENVIRONMENT

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

FILES

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

AUTHOR

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

SEE ALSO

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