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

NAME

6       ansible-console - REPL console for executing Ansible tasks.
7

SYNOPSIS

9       usage: ansible-console [-h] [--version] [-v] [-b]
10              [--become-method BECOME_METHOD] [--become-user BECOME_USER] [-K]
11              [-i INVENTORY] [--list-hosts] [-l  SUBSET]  [-k]  [--private-key
12              PRIVATE_KEY_FILE]  [-u REMOTE_USER] [-c CONNECTION] [-T TIMEOUT]
13              [--ssh-common-args SSH_COMMON_ARGS] [--sftp-extra-args  SFTP_EX‐
14              TRA_ARGS]  [--scp-extra-args  SCP_EXTRA_ARGS]  [--ssh-extra-args
15              SSH_EXTRA_ARGS]   [-C]   [--syntax-check]    [-D]    [--vault-id
16              VAULT_IDS] [--ask-vault-pass | --vault-password-file VAULT_PASS‐
17              WORD_FILES] [-f FORKS] [-M MODULE_PATH] [--playbook-dir BASEDIR]
18              [--step] [pattern]
19

DESCRIPTION

21       a  REPL that allows for running ad-hoc tasks against a chosen inventory
22       (based on dominis' ansible-shell).
23

COMMON OPTIONS

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

ENVIRONMENT

123       The following environment variables may be specified.
124
125       ANSIBLE_CONFIG -- Specify override location for the ansible config file
126
127       Many more are available for most options in ansible.cfg
128
129       For a full list  check  https://docs.ansible.com/.  or  use  the  ansi‐
130       ble-config command.
131

FILES

133       /etc/ansible/ansible.cfg -- Config file, used if present
134
135       ~/.ansible.cfg  --  User  config  file, overrides the default config if
136       present
137
138       ./ansible.cfg -- Local config file (in current working  directory)  as‐
139       sumed to be 'project specific' and overrides the rest if present.
140
141       As  mentioned above, the ANSIBLE_CONFIG environment variable will over‐
142       ride all others.
143

AUTHOR

145       Ansible was originally written by Michael DeHaan.
146
148       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
149       terms of the GPLv3 license.
150

SEE ALSO

152       ansible  (1),  ansible-config (1), ansible-doc (1), ansible-galaxy (1),
153       ansible-inventory (1), ansible-playbook (1),  ansible-pull  (1),  ansi‐
154       ble-vault (1)
155
156       Extensive  documentation  is  available  in  the documentation site: <‐
157       https://docs.ansible.com>.  IRC and mailing list info can be  found  in
158       file          CONTRIBUTING.md,         available         in:         <‐
159       https://github.com/ansible/ansible>
160
161
162
163
164Ansible 2.9.21                                              ANSIBLE-CONSOLE(1)
Impressum