1ANSIBLE-CONSOLE(1) System administration commands ANSIBLE-CONSOLE(1)
2
3
4
6 ansible-console - REPL console for executing Ansible tasks.
7
9 ansible-console [<host-pattern>] [options]
10
12 a REPL that allows for running ad-hoc tasks against a chosen inventory
13 (based on dominis' ansible-shell).
14
16 --ask-vault-pass
17 ask for vault password
18
19 --become-method 'BECOME_METHOD'
20 privilege escalation method to use (default=%default), use ansi‐
21 ble-doc -t become -l to list valid choices.
22
23 --become-user 'BECOME_USER'
24 run operations as this user (default=root)
25
26 --list-hosts
27 outputs a list of matching hosts; does not execute anything else
28
29 --playbook-dir 'BASEDIR'
30 Since this tool does not use playbooks, use this as a substitute
31 playbook directory.This sets the relative path for many features
32 including roles/ group_vars/ etc.
33
34 --private-key, --key-file
35 use this file to authenticate the connection
36
37 --scp-extra-args 'SCP_EXTRA_ARGS'
38 specify extra arguments to pass to scp only (e.g. -l)
39
40 --sftp-extra-args 'SFTP_EXTRA_ARGS'
41 specify extra arguments to pass to sftp only (e.g. -f, -l)
42
43 --ssh-common-args 'SSH_COMMON_ARGS'
44 specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
45
46 --ssh-extra-args 'SSH_EXTRA_ARGS'
47 specify extra arguments to pass to ssh only (e.g. -R)
48
49 --step
50 one-step-at-a-time: confirm each task before running
51
52 --syntax-check
53 perform a syntax check on the playbook, but do not execute it
54
55 --vault-id
56 the vault identity to use
57
58 --vault-password-file
59 vault password file
60
61 --version
62 show program's version number, config file location, configured mod‐
63 ule search path, module location, executable location and exit
64
65 -C, --check
66 don't make any changes; instead, try to predict some of the changes
67 that may occur
68
69 -D, --diff
70 when changing (small) files and templates, show the differences in
71 those files; works great with --check
72
73 -K, --ask-become-pass
74 ask for privilege escalation password
75
76 -M, --module-path
77 prepend colon-separated path(s) to module library (default=~/.ansi‐
78 ble/plugins/modules:/usr/share/ansible/plugins/modules)
79
80 -T 'TIMEOUT', --timeout 'TIMEOUT'
81 override the connection timeout in seconds (default=10)
82
83 -b, --become
84 run operations with become (does not imply password prompting)
85
86 -c 'CONNECTION', --connection 'CONNECTION'
87 connection type to use (default=smart)
88
89 -f 'FORKS', --forks 'FORKS'
90 specify number of parallel processes to use (default=5)
91
92 -h, --help
93 show this help message and exit
94
95 -i, --inventory, --inventory-file
96 specify inventory host path or comma separated host list. --inven‐
97 tory-file is deprecated
98
99 -k, --ask-pass
100 ask for connection password
101
102 -l 'SUBSET', --limit 'SUBSET'
103 further limit selected hosts to an additional pattern
104
105 -u 'REMOTE_USER', --user 'REMOTE_USER'
106 connect as this user (default=None)
107
108 -v, --verbose
109 verbose mode (-vvv for more, -vvvv to enable connection debugging)
110
112 The following environment variables may be specified.
113
114 ANSIBLE_CONFIG -- Specify override location for the ansible config file
115
116 Many more are available for most options in ansible.cfg
117
118 For a full list check https://docs.ansible.com/. or use the ansi‐
119 ble-config command.
120
122 /etc/ansible/ansible.cfg -- Config file, used if present
123
124 ~/.ansible.cfg -- User config file, overrides the default config if
125 present
126
127 ./ansible.cfg -- Local config file (in current working directory)
128 assumed to be 'project specific' and overrides the rest if present.
129
130 As mentioned above, the ANSIBLE_CONFIG environment variable will over‐
131 ride all others.
132
134 Ansible was originally written by Michael DeHaan.
135
137 Copyright © 2018 Red Hat, Inc | Ansible. Ansible is released under the
138 terms of the GPLv3 license.
139
141 ansible [22m(1), ansible-config (1), ansible-doc (1), ansible-galaxy (1),
142 ansible-inventory (1), ansible-playbook (1), ansible-pull [22m(1), ansi‐
143 ble-vault (1)
144
145 Extensive documentation is available in the documentation site: <‐
146 https://docs.ansible.com>. IRC and mailing list info can be found in
147 file CONTRIBUTING.md, available in: <‐
148 https://github.com/ansible/ansible>
149
150
151
152
153Ansible 2.8.1 ANSIBLE-CONSOLE(1)