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       ansible <host-pattern> [options]
11

DESCRIPTION

13       is an extra-simple tool/framework/API for doing 'remote things'.   this
14       command allows you to define and run a single task 'playbook' against a
15       set of hosts
16

COMMON OPTIONS

18       --ask-vault-pass
19          ask for vault password
20
21       --become-method 'BECOME_METHOD'
22          privilege escalation method to  use  (default=%default),  use  ansi‐
23          ble-doc -t become -l to list valid choices.
24
25       --become-user 'BECOME_USER'
26          run operations as this user (default=root)
27
28       --list-hosts
29          outputs a list of matching hosts; does not execute anything else
30
31       --playbook-dir 'BASEDIR'
32          Since  this  tool  does  not use playbooks, use this as a substitute
33          playbook directory.This sets the relative  path  for  many  features
34          including roles/ group_vars/ etc.
35
36       --private-key, --key-file
37          use this file to authenticate the connection
38
39       --scp-extra-args 'SCP_EXTRA_ARGS'
40          specify extra arguments to pass to scp only (e.g. -l)
41
42       --sftp-extra-args 'SFTP_EXTRA_ARGS'
43          specify extra arguments to pass to sftp only (e.g. -f, -l)
44
45       --ssh-common-args 'SSH_COMMON_ARGS'
46          specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
47
48       --ssh-extra-args 'SSH_EXTRA_ARGS'
49          specify extra arguments to pass to ssh only (e.g. -R)
50
51       --syntax-check
52          perform a syntax check on the playbook, but do not execute it
53
54       --vault-id
55          the vault identity to use
56
57       --vault-password-file
58          vault password file
59
60       --version
61          show program's version number, config file location, configured mod‐
62          ule search path, module location, executable location and exit
63
64       -B 'SECONDS', --background 'SECONDS'
65          run asynchronously, failing after X seconds (default=N/A)
66
67       -C, --check
68          don't make any changes; instead, try to predict some of the  changes
69          that may occur
70
71       -D, --diff
72          when  changing  (small) files and templates, show the differences in
73          those files; works great with --check
74
75       -K, --ask-become-pass
76          ask for privilege escalation password
77
78       -M, --module-path
79          prepend colon-separated path(s) to module library  (default=~/.ansi‐
80          ble/plugins/modules:/usr/share/ansible/plugins/modules)
81
82       -P 'POLL_INTERVAL', --poll 'POLL_INTERVAL'
83          set the poll interval if using -B (default=15)
84
85       -T 'TIMEOUT', --timeout 'TIMEOUT'
86          override the connection timeout in seconds (default=10)
87
88       -a 'MODULE_ARGS', --args 'MODULE_ARGS'
89          module arguments
90
91       -b, --become
92          run operations with become (does not imply password prompting)
93
94       -c 'CONNECTION', --connection 'CONNECTION'
95          connection type to use (default=smart)
96
97       -e, --extra-vars
98          set  additional  variables  as  key=value  or YAML/JSON, if filename
99          prepend with @
100
101       -f 'FORKS', --forks 'FORKS'
102          specify number of parallel processes to use (default=5)
103
104       -h, --help
105          show this help message and exit
106
107       -i, --inventory, --inventory-file
108          specify inventory host path or comma separated host  list.  --inven‐
109          tory-file is deprecated
110
111       -k, --ask-pass
112          ask for connection password
113
114       -l 'SUBSET', --limit 'SUBSET'
115          further limit selected hosts to an additional pattern
116
117       -m 'MODULE_NAME', --module-name 'MODULE_NAME'
118          module name to execute (default=command)
119
120       -o, --one-line
121          condense output
122
123       -t 'TREE', --tree 'TREE'
124          log output to this directory
125
126       -u 'REMOTE_USER', --user 'REMOTE_USER'
127          connect as this user (default=None)
128
129       -v, --verbose
130          verbose mode (-vvv for more, -vvvv to enable connection debugging)
131

ENVIRONMENT

133       The following environment variables may be specified.
134
135       ANSIBLE_CONFIG -- Specify override location for the ansible config file
136
137       Many more are available for most options in ansible.cfg
138
139       For  a  full  list  check  https://docs.ansible.com/.  or use the ansi‐
140       ble-config command.
141

FILES

143       /etc/ansible/ansible.cfg -- Config file, used if present
144
145       ~/.ansible.cfg -- User config file, overrides  the  default  config  if
146       present
147
148       ./ansible.cfg  --  Local  config  file  (in  current working directory)
149       assumed to be 'project specific' and overrides the rest if present.
150
151       As mentioned above, the ANSIBLE_CONFIG environment variable will  over‐
152       ride all others.
153

AUTHOR

155       Ansible was originally written by Michael DeHaan.
156
158       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
159       terms of the GPLv3 license.
160

SEE ALSO

162       ansible-config (1), ansible-console (1), ansible-doc (1),  ansible-gal‐
163       axy (1), ansible-inventory (1), ansible-playbook (1), ansible-pull (1),
164       ansible-vault (1)
165
166       Extensive documentation is available  in  the  documentation  site:  <‐
167       https://docs.ansible.com>.   IRC  and mailing list info can be found in
168       file         CONTRIBUTING.md,         available         in:          <‐
169       https://github.com/ansible/ansible>
170
171
172
173
174Ansible 2.8.1                                                       ANSIBLE(1)
Impressum