Ansible supports several sources for configuring its behavior, including an ini file named ansible.cfg
, environment variables, command-line options, playbook keywords, and variables. See Controlling how Ansible behaves: precedence rules for details on the relative precedence of each source.
The ansible-config
utility allows users to see all the configuration settings available, their defaults, how to set them and where their current value comes from. See ansible-config for more information.
Changes can be made and used in a configuration file which will be searched for in the following order:
ANSIBLE_CONFIG
(environment variable if set)ansible.cfg
(in the current directory)~/.ansible.cfg
(in the home directory)/etc/ansible/ansible.cfg
Ansible will process the above list and use the first file found, all others are ignored.
Note
The configuration file is one variant of an INI format. Both the hash sign (#
) and semicolon (;
) are allowed as comment markers when the comment starts the line. However, if the comment is inline with regular values, only the semicolon is allowed to introduce the comment. For instance:
# some basic default values... inventory = /etc/ansible/hosts ; This points to the file that lists your hosts
ansible.cfg
in the current directoryIf Ansible were to load ansible.cfg
from a world-writable current working directory, it would create a serious security risk. Another user could place their own config file there, designed to make Ansible run malicious code both locally and remotely, possibly with elevated privileges. For this reason, Ansible will not automatically load a config file from the current working directory if the directory is world-writable.
If you depend on using Ansible with a config file in the current working directory, the best way to avoid this problem is to restrict access to your Ansible directories to particular user(s) and/or group(s). If your Ansible directories live on a filesystem which has to emulate Unix permissions, like Vagrant or Windows Subsystem for Linux (WSL), you may, at first, not know how you can fix this as chmod
, chown
, and chgrp
might not work there. In most of those cases, the correct fix is to modify the mount options of the filesystem so the files and directories are readable and writable by the users and groups running Ansible but closed to others. For more details on the correct settings, see:
If you absolutely depend on storing your Ansible config in a world-writable current working directory, you can explicitly specify the config file via the ANSIBLE_CONFIG
environment variable. Please take appropriate steps to mitigate the security concerns above before doing so.
You can specify a relative path for many configuration options. In most of those cases the path used will be relative to the ansible.cfg
file used for the current execution. If you need a path relative to your current working directory (CWD) you can use the {{CWD}}
macro to specify it. We do not recommend this approach, as using your CWD as the root of relative paths can be a security risk. For example: cd /tmp; secureinfo=./newrootpassword ansible-playbook ~/safestuff/change_root_pwd.yml
.
This is a copy of the options available from our release, your local install might have extra options due to additional plugins, you can use the command line utility mentioned above (ansible-config
) to browse through those.
By default Ansible will issue a warning when received from a task action (module or action plugin) These warnings can be silenced by adjusting this setting to False.
boolean
True
2.5
[defaults]
action_warnings
Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method
boolean
True
2.5
[privilege_escalation]
agnostic_become_prompt
This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task. It is useful when becoming an unprivileged user.
boolean
False
2.1
[defaults]
allow_world_readable_tmpfiles
2.14
moved to a per plugin approach that is more flexible
mostly the same config will work, but now controlled from the plugin itself and not using the general constant.
Specify where to look for the ansible-connection script. This location will be checked before searching $PATH. If null, ansible will start with the same directory as the ansible script.
path
None
2.8
[persistent_connection]
ansible_connection_path
White list of cowsay templates that are ‘safe’ to use, set to empty list if you want to enable all installed templates.
list
[‘bud-frogs’, ‘bunny’, ‘cheese’, ‘daemon’, ‘default’, ‘dragon’, ‘elephant-in-snake’, ‘elephant’, ‘eyes’, ‘hellokitty’, ‘kitty’, ‘luke-koala’, ‘meow’, ‘milk’, ‘moofasa’, ‘moose’, ‘ren’, ‘sheep’, ‘small’, ‘stegosaurus’, ‘stimpy’, ‘supermilker’, ‘three-eyes’, ‘turkey’, ‘turtle’, ‘tux’, ‘udder’, ‘vader-koala’, ‘vader’, ‘www’]
[defaults]
cow_whitelist
2.15
normalizing names to new standard
cowsay_enabled_stencils
[defaults]
cowsay_enabled_stencils
2.11
2.11
2.15
normalizing names to new standard
ANSIBLE_COW_ACCEPTLIST
Specify a custom cowsay path or swap in your cowsay implementation of choice
string
None
[defaults]
cowpath
This allows you to chose a specific cowsay stencil for the banners or use ‘random’ to cycle through them.
default
[defaults]
cow_selection
This option forces color mode even when running without a TTY or the “nocolor” setting is True.
boolean
False
[defaults]
force_color
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.
boolean
False
[defaults]
nocolor
2.11
If you have cowsay installed but want to avoid the ‘cows’ (why????), use this.
boolean
False
[defaults]
nocows
Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer. This can result in a very significant performance improvement when enabled. However this conflicts with privilege escalation (become). For example, when using ‘sudo:’ operations you must first disable ‘requiretty’ in /etc/sudoers on all managed hosts, which is why it is disabled by default. This option is disabled if ANSIBLE_KEEP_REMOTE_FILES
is enabled. This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all.
boolean
False
[connection]
pipelining
[defaults]
pipelining
If set, this will override the Ansible default ssh arguments. In particular, users may wish to raise the ControlPersist time to encourage performance. A value of 30 minutes may be appropriate. Be aware that if -o ControlPath
is set in ssh_args, the control path setting is not used.
-C -o ControlMaster=auto -o ControlPersist=60s
[ssh_connection]
ssh_args
This is the location to save ssh’s ControlPath sockets, it uses ssh’s variable substitution. Since 2.3, if null, ansible will generate a unique hash. Use %(directory)s
to indicate where to use the control dir path setting. Before 2.3 it defaulted to control_path=%(directory)s/ansible-ssh-%%h-%%p-%%r
. Be aware that this setting is ignored if -o ControlPath
is set in ssh args.
None
[ssh_connection]
control_path
This sets the directory to use for ssh control path if the control path setting is null. Also, provides the %(directory)s
variable for the control path setting.
~/.ansible/cp
[ssh_connection]
control_path_dir
This defines the location of the ssh binary. It defaults to ssh
which will use the first ssh binary available in $PATH. This option is usually not required, it might be useful when access to system ssh is restricted, or when using ssh wrappers to connect to remote hosts.
ssh
2.2
[ssh_connection]
ssh_executable
Number of attempts to establish a connection before we give up and report the host as ‘UNREACHABLE’
integer
0
[ssh_connection]
retries
Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.
boolean
False
2.4
[defaults]
any_errors_fatal
This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root.
boolean
False
[privilege_escalation]
become_allow_same_user
Colon separated paths in which Ansible will search for Become Plugins.
pathspec
~/.ansible/plugins/become:/usr/share/ansible/plugins/become
2.8
[defaults]
become_plugins
Chooses which cache plugin to use, the default ‘memory’ is ephemeral.
memory
[defaults]
fact_caching
Defines connection or path information for the cache plugin
None
[defaults]
fact_caching_connection
Prefix to use for cache plugin files/tables
ansible_facts
[defaults]
fact_caching_prefix
Expiration timeout for the cache plugin data
integer
86400
[defaults]
fact_caching_timeout
Whitelist of callable methods to be made available to template evaluation
list
[]
[defaults]
callable_whitelist
2.15
normalizing names to new standard
callable_enabled
[defaults]
callable_enabled
2.11
2.11
2.15
normalizing names to new standard
ANSIBLE_CALLABLE_ENABLED
List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don’t want them activated by default.
list
[]
[defaults]
callback_whitelist
2.15
normalizing names to new standard
callback_enabled
[defaults]
callbacks_enabled
2.11
2.15
normalizing names to new standard
ANSIBLE_CALLBACKS_ENABLED
2.11
When a collection is loaded that does not support the running Ansible version (via the collection metadata key requires_ansible
), the default behavior is to issue a warning and continue anyway. Setting this value to ignore
skips the warning entirely, while setting it to fatal
will immediately halt Ansible execution.
warning
[defaults]
collections_on_ansible_version_mismatch
Colon separated paths in which Ansible will search for collections content. Collections must be in nested subdirectories, not directly in these directories. For example, if COLLECTIONS_PATHS
includes ~/.ansible/collections
, and you want to add my.collection
to that directory, it must be saved as ~/.ansible/collections/ansible_collections/my/collection
.
pathspec
~/.ansible/collections:/usr/share/ansible/collections
[defaults]
collections_paths
[defaults]
collections_path
2.10
2.10
boolean
True
[defaults]
collections_scan_sys_path
Defines the color to use on ‘Changed’ task status
yellow
[colors]
changed
Defines the default color to use for ansible-console
white
2.7
[colors]
console_prompt
Defines the color to use when emitting debug messages
dark gray
[colors]
debug
Defines the color to use when emitting deprecation messages
purple
[colors]
deprecate
Defines the color to use when showing added lines in diffs
green
[colors]
diff_add
Defines the color to use when showing diffs
cyan
[colors]
diff_lines
Defines the color to use when showing removed lines in diffs
red
[colors]
diff_remove
Defines the color to use when emitting error messages
red
[colors]
error
Defines the color to use for highlighting
white
[colors]
highlight
Defines the color to use when showing ‘OK’ task status
green
[colors]
ok
Defines the color to use when showing ‘Skipped’ task status
cyan
[colors]
skip
Defines the color to use on ‘Unreachable’ status
bright red
[colors]
unreachable
Defines the color to use when emitting verbose messages. i.e those that show with ‘-v’s.
blue
[colors]
verbose
Defines the color to use when emitting warning messages
bright purple
[colors]
warn
Ansible can issue a warning when the shell or command module is used and the command appears to be similar to an existing Ansible module. These warnings can be silenced by adjusting this setting to False. You can also control this at the task level with the module option warn
. As of version 2.11, this is disabled by default.
boolean
False
1.8
[defaults]
command_warnings
2.14
the command warnings feature is being removed
With this setting on (True), running conditional evaluation ‘var’ is treated differently than ‘var.subkey’ as the first is evaluated directly while the second goes through the Jinja2 parser. But ‘false’ strings in ‘var’ get evaluated as booleans. With this setting off they both evaluate the same but in cases in which ‘var’ was ‘false’ (a string) it won’t get evaluated as a boolean anymore. Currently this setting defaults to ‘True’ but will soon change to ‘False’ and the setting itself will be removed in the future. Expect that this setting eventually will be deprecated after 2.12
boolean
False
2.8
[defaults]
conditional_bare_variables
Which modules to run during a play’s fact gathering stage based on connection
dict
{‘asa’: ‘ansible.legacy.asa_facts’, ‘cisco.asa.asa’: ‘cisco.asa.asa_facts’, ‘eos’: ‘ansible.legacy.eos_facts’, ‘arista.eos.eos’: ‘arista.eos.eos_facts’, ‘frr’: ‘ansible.legacy.frr_facts’, ‘frr.frr.frr’: ‘frr.frr.frr_facts’, ‘ios’: ‘ansible.legacy.ios_facts’, ‘cisco.ios.ios’: ‘cisco.ios.ios_facts’, ‘iosxr’: ‘ansible.legacy.iosxr_facts’, ‘cisco.iosxr.iosxr’: ‘cisco.iosxr.iosxr_facts’, ‘junos’: ‘ansible.legacy.junos_facts’, ‘junipernetworks.junos.junos’: ‘junipernetworks.junos.junos_facts’, ‘nxos’: ‘ansible.legacy.nxos_facts’, ‘cisco.nxos.nxos’: ‘cisco.nxos.nxos_facts’, ‘vyos’: ‘ansible.legacy.vyos_facts’, ‘vyos.vyos.vyos’: ‘vyos.vyos.vyos_facts’, ‘exos’: ‘ansible.legacy.exos_facts’, ‘extreme.exos.exos’: ‘extreme.exos.exos_facts’, ‘slxos’: ‘ansible.legacy.slxos_facts’, ‘extreme.slxos.slxos’: ‘extreme.slxos.slxos_facts’, ‘voss’: ‘ansible.legacy.voss_facts’, ‘extreme.voss.voss’: ‘extreme.voss.voss_facts’, ‘ironware’: ‘ansible.legacy.ironware_facts’, ‘community.network.ironware’: ‘community.network.ironware_facts’}
[defaults]
connection_facts_modules
Toggle to control showing warnings related to running a Python version older than Python 3.8 on the controller
boolean
True
[defaults]
controller_python_warning
Sets the output directory on the remote host to generate coverage reports to. Currently only used for remote coverage on PowerShell modules. This is for internal use only.
str
2.9
_ansible_coverage_remote_output
A list of paths for files on the Ansible controller to run coverage for when executing on the remote host. Only files that match the path glob will have its coverage collected. Multiple path globs can be specified and are separated by :
. Currently only used for remote coverage on PowerShell modules. This is for internal use only.
str
2.9
Colon separated paths in which Ansible will search for Action Plugins.
pathspec
~/.ansible/plugins/action:/usr/share/ansible/plugins/action
[defaults]
action_plugins
When enabled, this option allows lookup plugins (whether used in variables as {{lookup('foo')}}
or as a loop as with_foo) to return data that is not marked ‘unsafe’. By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could represent a security risk. This option is provided to allow for backwards-compatibility, however users should first consider adding allow_unsafe=True to any lookups which may be expected to contain data which may be run through the templating engine late
boolean
False
2.2.3
[defaults]
allow_unsafe_lookups
This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probably do not needed to change this setting.
boolean
False
[defaults]
ask_pass
This controls whether an Ansible playbook should prompt for a vault password.
boolean
False
[defaults]
ask_vault_pass
Toggles the use of privilege escalation, allowing you to ‘become’ another user after login.
boolean
False
[privilege_escalation]
become
Toggle to prompt for privilege escalation password.
boolean
False
[privilege_escalation]
become_ask_pass
executable to use for privilege escalation, otherwise Ansible will depend on PATH
None
[privilege_escalation]
become_exe
Flags to pass to the privilege escalation executable.
[privilege_escalation]
become_flags
Privilege escalation method to use when become
is enabled.
sudo
[privilege_escalation]
become_method
The user your login/remote user ‘becomes’ when using privilege escalation, most systems will use ‘root’ when no user is specified.
root
[privilege_escalation]
become_user
Colon separated paths in which Ansible will search for Cache Plugins.
pathspec
~/.ansible/plugins/cache:/usr/share/ansible/plugins/cache
[defaults]
cache_plugins
Colon separated paths in which Ansible will search for Callback Plugins.
pathspec
~/.ansible/plugins/callback:/usr/share/ansible/plugins/callback
[defaults]
callback_plugins
Colon separated paths in which Ansible will search for Cliconf Plugins.
pathspec
~/.ansible/plugins/cliconf:/usr/share/ansible/plugins/cliconf
[defaults]
cliconf_plugins
Colon separated paths in which Ansible will search for Connection Plugins.
pathspec
~/.ansible/plugins/connection:/usr/share/ansible/plugins/connection
[defaults]
connection_plugins
Toggles debug output in Ansible. This is very verbose and can hinder multiprocessing. Debug output can also include secret information despite no_log settings being enabled, which means debug mode should not be used in production.
boolean
False
[defaults]
debug
This indicates the command to use to spawn a shell under for Ansible’s execution needs on a target. Users may need to change this in rare instances when shell usage is constrained, but in most cases it may be left as is.
/bin/sh
[defaults]
executable
This option allows you to globally configure a custom path for ‘local_facts’ for the implied M(ansible.builtin.setup) task when using fact gathering. If not set, it will fallback to the default from the M(ansible.builtin.setup) module: /etc/ansible/facts.d
. This does not affect user defined tasks that use the M(ansible.builtin.setup) module.
string
None
[defaults]
fact_path
Colon separated paths in which Ansible will search for Jinja2 Filter Plugins.
pathspec
~/.ansible/plugins/filter:/usr/share/ansible/plugins/filter
[defaults]
filter_plugins
This option controls if notified handlers run on a host even if a failure occurs on that host. When false, the handlers will not run if a failure has occurred on a host. This can also be set per play or on the command line. See Handlers and Failure for more details.
boolean
False
1.9.1
[defaults]
force_handlers
Maximum number of forks Ansible will use to execute tasks on target hosts.
integer
5
[defaults]
forks
Set the gather_subset
option for the M(ansible.builtin.setup) task in the implicit fact gathering. See the module documentation for specifics. It does not apply to user defined M(ansible.builtin.setup) tasks.
list
[‘all’]
2.1
[defaults]
gather_subset
Set the timeout in seconds for the implicit fact gathering. It does not apply to user defined M(ansible.builtin.setup) tasks.
integer
10
[defaults]
gather_timeout
This setting controls the default policy of fact gathering (facts discovered about remote systems). When ‘implicit’ (the default), the cache plugin will be ignored and facts will be gathered per play unless ‘gather_facts: False’ is set. When ‘explicit’ the inverse is true, facts will not be gathered unless directly requested in the play. The ‘smart’ value means each new host that has no facts discovered will be scanned, but if the same host is addressed in multiple plays it will not be contacted again in the playbook run. This option can be useful for those wishing to save fact gathering time. Both ‘smart’ and ‘explicit’ will use the cache plugin.
implicit
1.6
[defaults]
gathering
Since 2.0 M(ansible.builtin.include) can be ‘dynamic’, this setting (if True) forces that if the include appears in a handlers
section to be ‘static’.
boolean
False
[defaults]
handler_includes_static
2.12
include itself is deprecated and this setting will not matter in the future
none as its already built into the decision between include_tasks and import_tasks
This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible. This does not affect variables whose values are scalars (integers, strings) or arrays. WARNING, changing this setting is not recommended as this is fragile and makes your content (plays, roles, collections) non portable, leading to continual confusion and misuse. Don’t change this setting unless you think you have an absolute need for it. We recommend avoiding reusing variable names and relying on the combine
filter and vars
and varnames
lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays. For some uses you can also look into custom vars_plugins to merge on input, even substituting the default host_group_vars
that is in charge of parsing the host_vars/
and group_vars/
directories. Most users of this setting are only interested in inventory scope, but the setting itself affects all sources and makes debugging even harder. All playbooks and roles in the official examples repos assume the default for this setting. Changing the setting to merge
applies across variable sources, but many sources will internally still overwrite the variables. For example include_vars
will dedupe variables internally before updating Ansible, with ‘last defined’ overwriting previous definitions in same file. The Ansible project recommends you avoid ``merge`` for new projects. It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should avoid ‘merge’.
string
replace
Any variable that is defined more than once is overwritten using the order from variable precedence rules (highest wins).
Any dictionary variable will be recursively merged with new definitions across the different variable definition sources.
[defaults]
hash_behaviour
Comma separated list of Ansible inventory sources
pathlist
/etc/ansible/hosts
[defaults]
inventory
Colon separated paths in which Ansible will search for HttpApi Plugins.
pathspec
~/.ansible/plugins/httpapi:/usr/share/ansible/plugins/httpapi
[defaults]
httpapi_plugins
This sets the interval (in seconds) of Ansible internal processes polling each other. Lower values improve performance with large playbooks at the expense of extra CPU load. Higher values are more suitable for Ansible usage in automation scenarios, when UI responsiveness is not required but CPU usage might be a concern. The default corresponds to the value hardcoded in Ansible <= 2.1
float
0.001
2.2
[defaults]
internal_poll_interval
Colon separated paths in which Ansible will search for Inventory Plugins.
pathspec
~/.ansible/plugins/inventory:/usr/share/ansible/plugins/inventory
[defaults]
inventory_plugins
This is a developer-specific feature that allows enabling additional Jinja2 extensions. See the Jinja2 documentation for details. If you do not know what these do, you probably don’t need to change this setting :)
[]
[defaults]
jinja2_extensions
This option preserves variable types during template operations. This requires Jinja2 >= 2.10.
boolean
False
2.7
[defaults]
jinja2_native
Enables/disables the cleaning up of the temporary files Ansible used to execute the tasks on the remote. If this option is enabled it will disable ANSIBLE_PIPELINING
.
boolean
False
[defaults]
keep_remote_files
This setting causes libvirt to connect to lxc containers by passing –noseclabel to virsh. This is necessary when running on systems which do not have SELinux.
boolean
False
2.1
[selinux]
libvirt_lxc_noseclabel
2.12
environment variables without ANSIBLE_
prefix are deprecated
the ANSIBLE_LIBVIRT_LXC_NOSECLABEL
environment variable
Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from the command line, send notifications, and so on. Callback plugins are always loaded for ansible-playbook
.
boolean
False
1.8
[defaults]
bin_ansible_callbacks
Temporary directory for Ansible to use on the controller.
tmppath
~/.ansible/tmp
[defaults]
local_tmp
List of logger names to filter out of the log file
list
[]
[defaults]
log_filter
File to which Ansible will log on the controller. When empty logging is disabled.
path
None
[defaults]
log_path
Colon separated paths in which Ansible will search for Lookup Plugins.
pathspec
~/.ansible/plugins/lookup:/usr/share/ansible/plugins/lookup
[defaults]
lookup_plugins
Sets the macro for the ‘ansible_managed’ variable available for M(ansible.builtin.template) and M(ansible.windows.win_template) modules. This is only relevant for those two modules.
Ansible managed
[defaults]
ansible_managed
This sets the default arguments to pass to the ansible
adhoc binary if no -a
is specified.
[defaults]
module_args
Compression scheme to use when transferring Python modules to the target.
ZIP_DEFLATED
[defaults]
module_compression
Module to use with the ansible
AdHoc command, if none is specified via -m
.
command
[defaults]
module_name
Colon separated paths in which Ansible will search for Modules.
pathspec
~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
[defaults]
library
Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.
pathspec
~/.ansible/plugins/module_utils:/usr/share/ansible/plugins/module_utils
[defaults]
module_utils
Colon separated paths in which Ansible will search for Netconf Plugins.
pathspec
~/.ansible/plugins/netconf:/usr/share/ansible/plugins/netconf
[defaults]
netconf_plugins
Toggle Ansible’s display and logging of task details, mainly used to avoid security disclosures.
boolean
False
[defaults]
no_log
Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writting to the event log.
boolean
False
[defaults]
no_target_syslog
ansible_no_target_syslog
:Version Added: 2.10
What templating should return as a ‘null’ value. When not set it will let Jinja2 decide.
none
None
[defaults]
null_representation
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed.
integer
15
[defaults]
poll_interval
Option for connections using a certificate or key file to authenticate, rather than an agent or passwords, you can set the default value here to avoid re-specifying –private-key with every invocation.
path
None
[defaults]
private_key_file
Makes role variables inaccessible from other roles. This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook.
boolean
False
[defaults]
private_role_vars
Port to use in remote connections, when blank it will use the connection plugin default.
integer
None
[defaults]
remote_port
Sets the login user for the target machines When blank it uses the connection plugin’s default, normally the user currently executing Ansible.
None
[defaults]
remote_user
Colon separated paths in which Ansible will search for Roles.
pathspec
~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
[defaults]
roles_path
Preferred method to use when transferring files over ssh. When set to smart, Ansible will try them until one succeeds or they all fail. If set to True, it will force ‘scp’, if False it will use ‘sftp’.
smart
[ssh_connection]
scp_if_ssh
Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible ‘tolerate’ those in the list w/o causing fatal errors. Data corruption may occur and writes are not always verified when a filesystem is in the list.
list
fuse, nfs, vboxsf, ramfs, 9p, vfat
[selinux]
special_context_filesystems
ANSIBLE_SELINUX_SPECIAL_FS
:Version Added: 2.9
boolean
True
[ssh_connection]
sftp_batch_mode
unused?
None
[ssh_connection]
transfer_method
Set the main callback used to display Ansible output, you can only have one at a time. You can have many other callbacks, but just one can be in charge of stdout.
default
[defaults]
stdout_callback
Set the default strategy used for plays.
linear
2.3
[defaults]
strategy
Colon separated paths in which Ansible will search for Strategy Plugins.
pathspec
~/.ansible/plugins/strategy:/usr/share/ansible/plugins/strategy
[defaults]
strategy_plugins
Toggle the use of “su” for tasks.
boolean
False
[defaults]
su
Syslog facility to use when Ansible logs to the remote target
LOG_USER
[defaults]
syslog_facility
The include
tasks can be static or dynamic, this toggles the default expected behaviour if autodetection fails and it is not explicitly set in task.
boolean
False
2.1
[defaults]
task_includes_static
2.12
include itself is deprecated and this setting will not matter in the future
None, as its already built into the decision between include_tasks and import_tasks
Colon separated paths in which Ansible will search for Terminal Plugins.
pathspec
~/.ansible/plugins/terminal:/usr/share/ansible/plugins/terminal
[defaults]
terminal_plugins
Colon separated paths in which Ansible will search for Jinja2 Test Plugins.
pathspec
~/.ansible/plugins/test:/usr/share/ansible/plugins/test
[defaults]
test_plugins
This is the default timeout for connection plugins to use.
integer
10
[defaults]
timeout
Default connection plugin to use, the ‘smart’ option will toggle between ‘ssh’ and ‘paramiko’ depending on controller OS and ssh versions
smart
[defaults]
transport
When True, this causes ansible templating to fail steps that reference variable names that are likely typoed. Otherwise, any ‘{{ template_expression }}’ that contains undefined variables will be rendered in a template or ansible action line exactly as written.
boolean
True
1.3
[defaults]
error_on_undefined_vars
Colon separated paths in which Ansible will search for Vars Plugins.
pathspec
~/.ansible/plugins/vars:/usr/share/ansible/plugins/vars
[defaults]
vars_plugins
The vault_id to use for encrypting by default. If multiple vault_ids are provided, this specifies which to use for encryption. The –encrypt-vault-id cli option overrides the configured value.
None
[defaults]
vault_encrypt_identity
If true, decrypting vaults with a vault id will only try the password from the matching vault-id
False
[defaults]
vault_id_match
The label to use for the default vault id label in cases where a vault id label is not provided
default
[defaults]
vault_identity
A list of vault-ids to use by default. Equivalent to multiple –vault-id args. Vault-ids are tried in order.
list
[]
[defaults]
vault_identity_list
The vault password file to use. Equivalent to –vault-password-file or –vault-id
path
None
[defaults]
vault_password_file
Sets the default verbosity, equivalent to the number of -v
passed in the command line.
integer
0
[defaults]
verbosity
Toggle to control the showing of deprecation warnings
boolean
True
[defaults]
deprecation_warnings
Toggle to control showing warnings related to running devel
boolean
True
[defaults]
devel_warning
Configuration toggle to tell modules to show differences when in ‘changed’ status, equivalent to --diff
.
bool
False
[diff]
always
How many lines of context to show when displaying the differences between files.
integer
3
[diff]
context
Normally ansible-playbook
will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn’t then ansible-playbook
uses the task’s action to help you tell which task is presently running. Sometimes you run many of the same action and so you want more information about the task to differentiate it from others of the same action. If you set this variable to True in the config then ansible-playbook
will also include the task’s arguments in the header. This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed. If you set this to True you should be sure that you have secured your environment’s stdout (no one can shoulder surf your screen and you aren’t saving stdout to an insecure file) or made sure that all of your playbooks explicitly added the no_log: True
parameter to tasks which have sensitive values See How do I keep secret data in my playbook? for more information.
boolean
False
2.1
[defaults]
display_args_to_stdout
Toggle to control displaying skipped task/host entries in a task in the default callback
boolean
True
[defaults]
display_skipped_hosts
2.12
environment variables without ANSIBLE_
prefix are deprecated
the ANSIBLE_DISPLAY_SKIPPED_HOSTS
environment variable
Colon separated paths in which Ansible will search for Documentation Fragments Plugins.
pathspec
~/.ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments
[defaults]
doc_fragment_plugins
Root docsite URL used to generate docs URLs in warning/error text; must be an absolute URL with valid scheme and trailing slash.
2.8
[defaults]
docsite_root_url
By default Ansible will issue a warning when a duplicate dict key is encountered in YAML. These warnings can be silenced by adjusting this setting to False.
string
warn
2.9
[defaults]
duplicate_dict_key
Whether or not to enable the task debugger, this previously was done as a strategy plugin. Now all strategy plugins can inherit this behavior. The debugger defaults to activating when a task is failed on unreachable. Use the debugger keyword for more flexibility.
boolean
False
2.5
[defaults]
enable_task_debugger
Toggle to allow missing handlers to become a warning instead of an error when notifying.
boolean
True
[defaults]
error_on_missing_handler
Which modules to run during a play’s fact gathering stage, using the default of ‘smart’ will try to figure it out based on connection type.
list
[‘smart’]
[defaults]
facts_modules
ansible_facts_modules
The directory that stores cached responses from a Galaxy server. This is only used by the ansible-galaxy collection install
and download
commands. Cache files inside this dir will be ignored if they are world writable.
path
~/.ansible/galaxy_cache
2.11
[galaxy]
cache_dir
Some steps in ansible-galaxy
display a progress wheel which can cause issues on certain displays or when outputing the stdout to a file. This config option controls whether the display wheel is shown or not. The default is to show the display wheel if stdout has a tty.
bool
None
2.10
[galaxy]
display_progress
If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate.
boolean
False
[galaxy]
ignore_certs
Role or collection skeleton directory to use as a template for the init
action in ansible-galaxy
, same as --role-skeleton
.
path
None
[galaxy]
role_skeleton
patterns of files to ignore inside a Galaxy role or collection skeleton directory
list
[‘^.git$’, ‘^.*/.git_keep$’]
[galaxy]
role_skeleton_ignore
URL to prepend when roles don’t specify the full URI, assume they are referencing this server as the source.
[galaxy]
server
A list of Galaxy servers to use when installing a collection. The value corresponds to the config ini header [galaxy_server.{{item}}]
which defines the server details. See Configuring the ansible-galaxy client for more details on how to define a Galaxy server. The order of servers in this list is used to as the order in which a collection is resolved. Setting this config option will ignore the GALAXY_SERVER config option.
list
2.9
[galaxy]
server_list
Local path to galaxy access token file
path
~/.ansible/galaxy_token
2.9
[galaxy]
token_path
Set this to “False” if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host
boolean
True
[defaults]
host_key_checking
This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it
warning
2.8
[inventory]
host_pattern_mismatch
Facts are available inside the ansible_facts
variable, this setting also pushes them as their own vars in the main namespace. Unlike inside the ansible_facts
dictionary, these will have an ansible_
prefix.
boolean
True
2.5
[defaults]
inject_facts_as_vars
Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are auto
, auto_silent
, and auto_legacy
(the default). All discovery modes employ a lookup table to use the included system Python (on distributions known to include one), falling back to a fixed ordered list of well-known Python interpreter locations if a platform-specific default is not available. The fallback behavior will issue a warning that the interpreter should be set explicitly (since interpreters installed later may change which one is used). This warning behavior can be disabled by setting auto_silent
. The default value of auto_legacy
provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to /usr/bin/python
, will use that interpreter if present (and issue a warning that the default behavior will change to that of auto
in a future Ansible release.
auto_legacy
2.8
[defaults]
interpreter_python
ansible_python_interpreter
{‘centos’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘debian’: {‘10’: ‘/usr/bin/python3’}, ‘fedora’: {‘23’: ‘/usr/bin/python3’}, ‘oracle’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘redhat’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘rhel’: {‘6’: ‘/usr/bin/python’, ‘8’: ‘/usr/libexec/platform-python’}, ‘ubuntu’: {‘14’: ‘/usr/bin/python’, ‘16’: ‘/usr/bin/python3’}}
2.8
[‘/usr/bin/python’, ‘python3.9’, ‘python3.8’, ‘python3.7’, ‘python3.6’, ‘python3.5’, ‘python2.7’, ‘python2.6’, ‘/usr/libexec/platform-python’, ‘/usr/bin/python3’, ‘python’]
2.8
If ‘false’, invalid attributes for a task will result in warnings instead of errors
boolean
True
2.7
[defaults]
invalid_task_attribute_failed
If ‘true’, it is a fatal error when any given inventory source cannot be successfully parsed by any available inventory plugin; otherwise, this situation only attracts a warning.
boolean
False
2.7
[inventory]
any_unparsed_is_failed
Toggle to turn on inventory caching
bool
False
[inventory]
cache
The plugin for caching inventory. If INVENTORY_CACHE_PLUGIN is not provided CACHE_PLUGIN can be used instead.
[inventory]
cache_plugin
The inventory cache connection. If INVENTORY_CACHE_PLUGIN_CONNECTION is not provided CACHE_PLUGIN_CONNECTION can be used instead.
[inventory]
cache_connection
The table prefix for the cache plugin. If INVENTORY_CACHE_PLUGIN_PREFIX is not provided CACHE_PLUGIN_PREFIX can be used instead.
ansible_facts
[inventory]
cache_prefix
Expiration timeout for the inventory cache plugin data. If INVENTORY_CACHE_TIMEOUT is not provided CACHE_TIMEOUT can be used instead.
3600
[inventory]
cache_timeout
List of enabled inventory plugins, it also determines the order in which they are used.
list
[‘host_list’, ‘script’, ‘auto’, ‘yaml’, ‘ini’, ‘toml’]
[inventory]
enable_plugins
Controls if ansible-inventory will accurately reflect Ansible’s view into inventory or its optimized for exporting.
bool
False
[inventory]
export
List of extensions to ignore when using a directory as an inventory source
list
{{(REJECT_EXTS + (‘.orig’, ‘.ini’, ‘.cfg’, ‘.retry’))}}
[defaults]
inventory_ignore_extensions
[inventory]
ignore_extensions
List of patterns to ignore when using a directory as an inventory source
list
[]
[defaults]
inventory_ignore_patterns
[inventory]
ignore_patterns
If ‘true’ it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning.
bool
False
[inventory]
unparsed_is_failed
By default Ansible will issue a warning when there are no hosts in the inventory. These warnings can be silenced by adjusting this setting to False.
boolean
True
2.6
[defaults]
localhost_warning
Maximum size of files to be considered for diff display
int
104448
[defaults]
max_diff_size
List of extensions to ignore when looking for modules to load This is for rejecting script and binary module fallback extensions
list
{{(REJECT_EXTS + (‘.yaml’, ‘.yml’, ‘.ini’))}}
[defaults]
module_ignore_exts
This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings.
None
[netconf_connection]
ssh_config
list
[‘eos’, ‘nxos’, ‘ios’, ‘iosxr’, ‘junos’, ‘enos’, ‘ce’, ‘vyos’, ‘sros’, ‘dellos9’, ‘dellos10’, ‘dellos6’, ‘asa’, ‘aruba’, ‘aireos’, ‘bigip’, ‘ironware’, ‘onyx’, ‘netconf’, ‘exos’, ‘voss’, ‘slxos’]
[defaults]
network_group_modules
2.12
environment variables without ANSIBLE_
prefix are deprecated
the ANSIBLE_NETWORK_GROUP_MODULES
environment variable
Previouslly Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in prevoius plays would be unexpectedly ‘sticky’. This setting allows to return to that behaviour.
boolean
False
2.8
[defaults]
old_plugin_cache_clear
boolean
False
[paramiko_connection]
host_key_auto_add
boolean
True
[paramiko_connection]
look_for_keys
This controls the amount of time to wait for response from remote device before timing out persistent connection.
int
30
[persistent_connection]
command_timeout
This controls the retry timeout for persistent connection to connect to the local domain socket.
integer
15
[persistent_connection]
connect_retry_timeout
This controls how long the persistent connection will remain idle before it is destroyed.
integer
30
[persistent_connection]
connect_timeout
Path to socket to be used by the connection persistence system.
path
~/.ansible/pc
[persistent_connection]
control_path_dir
A number of non-playbook CLIs have a --playbook-dir
argument; this sets the default value for it.
path
2.9
[defaults]
playbook_dir
This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host_vars/group_vars The top
option follows the traditional behaviour of using the top playbook in the chain to find the root directory. The bottom
option follows the 2.4.0 behaviour of using the current playbook to find the root directory. The all
option examines from the first parent to the current playbook.
top
2.4.1
[defaults]
playbook_vars_root
A path to configuration for filtering which plugins installed on the system are allowed to be used. See Rejecting modules for details of the filter file’s format. The default is /etc/ansible/plugin_filters.yml
path
None
2.5.0
[default]
plugin_filters_cfg
2.12
specifying “plugin_filters_cfg” under the “default” section is deprecated
the “defaults” section instead
[defaults]
plugin_filters_cfg
Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See https://bugs.python.org/issue11284). The value will be limited by the existing hard limit. Default value of 0 does not attempt to adjust existing system-defined limits.
0
2.8
[defaults]
python_module_rlimit_nofile
ansible_python_module_rlimit_nofile
This controls whether a failed Ansible playbook should create a .retry file.
bool
False
[defaults]
retry_files_enabled
This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled. This file will be overwritten after each run with the list of failed hosts from all plays.
path
None
[defaults]
retry_files_save_path
This setting can be used to optimize vars_plugin usage depending on user’s inventory size and play selection. Setting to C(demand) will run vars_plugins relative to inventory sources anytime vars are ‘demanded’ by tasks. Setting to C(start) will run vars_plugins relative to inventory sources after importing that inventory source.
str
demand
2.10
[defaults]
run_vars_plugins
This adds the custom stats set via the set_stats plugin to the default output
bool
False
[defaults]
show_custom_stats
Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as ‘1.00’, “[‘a’, ‘b’,]”, and ‘yes’, ‘y’, etc. will be converted by the YAML parser unless fully quoted. Valid options are ‘error’, ‘warn’, and ‘ignore’. Since 2.8, this option defaults to ‘warn’ but will change to ‘error’ in 2.12.
string
warn
2.8
[defaults]
string_conversion_action
This list of filters avoids ‘type conversion’ when templating variables Useful when you want to avoid conversion into lists or dictionaries for JSON strings, for example.
list
[‘string’, ‘to_json’, ‘to_nice_json’, ‘to_yaml’, ‘to_nice_yaml’, ‘ppretty’, ‘json’]
[jinja2]
dont_type_filters
Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts) These may include warnings about 3rd party packages or other conditions that should be resolved if possible.
boolean
True
[defaults]
system_warnings
default list of tags to run in your plays, Skip Tags has precedence.
list
[]
2.5
[tags]
run
default list of tags to skip in your plays, has precedence over Run Tags
list
[]
2.5
[tags]
skip
This option defines whether the task debugger will be invoked on a failed task when ignore_errors=True is specified. True specifies that the debugger will honor ignore_errors, False will not honor ignore_errors.
boolean
True
2.7
[defaults]
task_debugger_ignore_errors
Set the maximum time (in seconds) that a task can run for. If set to 0 (the default) there is no timeout.
integer
0
2.10
[defaults]
task_timeout
Make ansible transform invalid characters in group names supplied by inventory sources. If ‘never’ it will allow for the group name but warn about the issue. When ‘ignore’, it does the same as ‘never’, without issuing a warning. When ‘always’ it will replace any invalid characters with ‘_’ (underscore) and warn the user When ‘silently’, it does the same as ‘always’, without issuing a warning.
string
never
2.8
[defaults]
force_valid_group_names
Toggles the use of persistence for connections.
boolean
False
[defaults]
use_persistent_connections
Whitelist for variable plugins that require it.
list
[‘host_group_vars’]
2.10
[defaults]
vars_plugins_enabled
Allows to change the group variable precedence merge order.
list
[‘all_inventory’, ‘groups_inventory’, ‘all_plugins_inventory’, ‘all_plugins_play’, ‘groups_plugins_inventory’, ‘groups_plugins_play’]
2.4
[defaults]
precedence
Force ‘verbose’ option to use stderr instead of stdout
bool
False
2.8
[defaults]
verbose_to_stderr
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load. This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here.
integer
5
2.10
[defaults]
win_async_startup_timeout
ansible_win_async_startup_timeout
The maximum number of times to check Task Queue Manager worker processes to verify they have exited cleanly. After this limit is reached any worker processes still running will be terminated. This is for internal use only.
integer
0
2.10
The number of seconds to sleep between polling loops when checking Task Queue Manager worker processes to verify they have exited cleanly. This is for internal use only.
float
0.1
2.10
Check all of these extensions when looking for ‘variable’ files which should be YAML or JSON or vaulted versions of these. This affects vars_files, include_vars, inventory and vars plugins among others.
list
[‘.yml’, ‘.yaml’, ‘.json’]
[defaults]
yaml_valid_extensions
ANSIBLE_CONFIG
Override the default ansible config file
ANSIBLE_CONNECTION_PATH
Specify where to look for the ansible-connection script. This location will be checked before searching $PATH.If null, ansible will start with the same directory as the ansible script.
See also ANSIBLE_CONNECTION_PATH
ANSIBLE_COW_SELECTION
This allows you to chose a specific cowsay stencil for the banners or use ‘random’ to cycle through them.
See also ANSIBLE_COW_SELECTION
ANSIBLE_COW_WHITELIST
White list of cowsay templates that are ‘safe’ to use, set to empty list if you want to enable all installed templates.
See also ANSIBLE_COW_ACCEPTLIST
2.15
normalizing names to new standard
ANSIBLE_COW_ACCEPTLIST
ANSIBLE_COW_ACCEPTLIST
White list of cowsay templates that are ‘safe’ to use, set to empty list if you want to enable all installed templates.
See also ANSIBLE_COW_ACCEPTLIST
2.11
ANSIBLE_FORCE_COLOR
This option forces color mode even when running without a TTY or the “nocolor” setting is True.
See also ANSIBLE_FORCE_COLOR
ANSIBLE_NOCOLOR
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.
See also ANSIBLE_NOCOLOR
NO_COLOR
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.
See also ANSIBLE_NOCOLOR
2.11
ANSIBLE_NOCOWS
If you have cowsay installed but want to avoid the ‘cows’ (why????), use this.
See also ANSIBLE_NOCOWS
ANSIBLE_COW_PATH
Specify a custom cowsay path or swap in your cowsay implementation of choice
See also ANSIBLE_COW_PATH
ANSIBLE_PIPELINING
Pipelining, if supported by the connection plugin, reduces the number of network operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfer.This can result in a very significant performance improvement when enabled.However this conflicts with privilege escalation (become). For example, when using ‘sudo:’ operations you must first disable ‘requiretty’ in /etc/sudoers on all managed hosts, which is why it is disabled by default.This option is disabled if ANSIBLE_KEEP_REMOTE_FILES
is enabled.This is a global option, each connection plugin can override either by having more specific options or not supporting pipelining at all.
See also ANSIBLE_PIPELINING
ANSIBLE_SSH_ARGS
If set, this will override the Ansible default ssh arguments.In particular, users may wish to raise the ControlPersist time to encourage performance. A value of 30 minutes may be appropriate.Be aware that if -o ControlPath
is set in ssh_args, the control path setting is not used.
See also ANSIBLE_SSH_ARGS
ANSIBLE_SSH_CONTROL_PATH
This is the location to save ssh’s ControlPath sockets, it uses ssh’s variable substitution.Since 2.3, if null, ansible will generate a unique hash. Use %(directory)s
to indicate where to use the control dir path setting.Before 2.3 it defaulted to control_path=%(directory)s/ansible-ssh-%%h-%%p-%%r
.Be aware that this setting is ignored if -o ControlPath
is set in ssh args.
See also ANSIBLE_SSH_CONTROL_PATH
ANSIBLE_SSH_CONTROL_PATH_DIR
This sets the directory to use for ssh control path if the control path setting is null.Also, provides the %(directory)s
variable for the control path setting.
See also ANSIBLE_SSH_CONTROL_PATH_DIR
ANSIBLE_SSH_EXECUTABLE
This defines the location of the ssh binary. It defaults to ssh
which will use the first ssh binary available in $PATH.This option is usually not required, it might be useful when access to system ssh is restricted, or when using ssh wrappers to connect to remote hosts.
See also ANSIBLE_SSH_EXECUTABLE
ANSIBLE_SSH_RETRIES
Number of attempts to establish a connection before we give up and report the host as ‘UNREACHABLE’
See also ANSIBLE_SSH_RETRIES
ANSIBLE_ANY_ERRORS_FATAL
Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.
See also ANY_ERRORS_FATAL
ANSIBLE_BECOME_ALLOW_SAME_USER
This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root.
See also BECOME_ALLOW_SAME_USER
ANSIBLE_AGNOSTIC_BECOME_PROMPT
Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method
See also AGNOSTIC_BECOME_PROMPT
ANSIBLE_CACHE_PLUGIN
Chooses which cache plugin to use, the default ‘memory’ is ephemeral.
See also CACHE_PLUGIN
ANSIBLE_CACHE_PLUGIN_CONNECTION
Defines connection or path information for the cache plugin
See also CACHE_PLUGIN_CONNECTION
ANSIBLE_CACHE_PLUGIN_PREFIX
Prefix to use for cache plugin files/tables
See also CACHE_PLUGIN_PREFIX
ANSIBLE_CACHE_PLUGIN_TIMEOUT
Expiration timeout for the cache plugin data
See also CACHE_PLUGIN_TIMEOUT
ANSIBLE_COLLECTIONS_SCAN_SYS_PATH
See also COLLECTIONS_SCAN_SYS_PATH
ANSIBLE_COLLECTIONS_PATHS
Colon separated paths in which Ansible will search for collections content. Collections must be in nested subdirectories, not directly in these directories. For example, if COLLECTIONS_PATHS
includes ~/.ansible/collections
, and you want to add my.collection
to that directory, it must be saved as ~/.ansible/collections/ansible_collections/my/collection
.
See also COLLECTIONS_PATHS
ANSIBLE_COLLECTIONS_PATH
Colon separated paths in which Ansible will search for collections content. Collections must be in nested subdirectories, not directly in these directories. For example, if COLLECTIONS_PATHS
includes ~/.ansible/collections
, and you want to add my.collection
to that directory, it must be saved as ~/.ansible/collections/ansible_collections/my/collection
.
See also COLLECTIONS_PATHS
2.10
ANSIBLE_COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH
When a collection is loaded that does not support the running Ansible version (via the collection metadata key requires_ansible
), the default behavior is to issue a warning and continue anyway. Setting this value to ignore
skips the warning entirely, while setting it to fatal
will immediately halt Ansible execution.
ANSIBLE_COLOR_CHANGED
Defines the color to use on ‘Changed’ task status
See also COLOR_CHANGED
ANSIBLE_COLOR_CONSOLE_PROMPT
Defines the default color to use for ansible-console
See also COLOR_CONSOLE_PROMPT
ANSIBLE_COLOR_DEBUG
Defines the color to use when emitting debug messages
See also COLOR_DEBUG
ANSIBLE_COLOR_DEPRECATE
Defines the color to use when emitting deprecation messages
See also COLOR_DEPRECATE
ANSIBLE_COLOR_DIFF_ADD
Defines the color to use when showing added lines in diffs
See also COLOR_DIFF_ADD
ANSIBLE_COLOR_DIFF_LINES
Defines the color to use when showing diffs
See also COLOR_DIFF_LINES
ANSIBLE_COLOR_DIFF_REMOVE
Defines the color to use when showing removed lines in diffs
See also COLOR_DIFF_REMOVE
ANSIBLE_COLOR_ERROR
Defines the color to use when emitting error messages
See also COLOR_ERROR
ANSIBLE_COLOR_HIGHLIGHT
Defines the color to use for highlighting
See also COLOR_HIGHLIGHT
ANSIBLE_COLOR_OK
Defines the color to use when showing ‘OK’ task status
See also COLOR_OK
ANSIBLE_COLOR_SKIP
Defines the color to use when showing ‘Skipped’ task status
See also COLOR_SKIP
ANSIBLE_COLOR_UNREACHABLE
Defines the color to use on ‘Unreachable’ status
See also COLOR_UNREACHABLE
ANSIBLE_COLOR_VERBOSE
Defines the color to use when emitting verbose messages. i.e those that show with ‘-v’s.
See also COLOR_VERBOSE
ANSIBLE_COLOR_WARN
Defines the color to use when emitting warning messages
See also COLOR_WARN
ANSIBLE_CONDITIONAL_BARE_VARS
With this setting on (True), running conditional evaluation ‘var’ is treated differently than ‘var.subkey’ as the first is evaluated directly while the second goes through the Jinja2 parser. But ‘false’ strings in ‘var’ get evaluated as booleans.With this setting off they both evaluate the same but in cases in which ‘var’ was ‘false’ (a string) it won’t get evaluated as a boolean anymore.Currently this setting defaults to ‘True’ but will soon change to ‘False’ and the setting itself will be removed in the future.Expect that this setting eventually will be deprecated after 2.12
See also CONDITIONAL_BARE_VARS
_ANSIBLE_COVERAGE_REMOTE_OUTPUT
Sets the output directory on the remote host to generate coverage reports to.Currently only used for remote coverage on PowerShell modules.This is for internal use only.
See also COVERAGE_REMOTE_OUTPUT
_ANSIBLE_COVERAGE_REMOTE_PATH_FILTER
A list of paths for files on the Ansible controller to run coverage for when executing on the remote host.Only files that match the path glob will have its coverage collected.Multiple path globs can be specified and are separated by :
.Currently only used for remote coverage on PowerShell modules.This is for internal use only.
See also COVERAGE_REMOTE_PATHS
ANSIBLE_ACTION_WARNINGS
By default Ansible will issue a warning when received from a task action (module or action plugin)These warnings can be silenced by adjusting this setting to False.
See also ACTION_WARNINGS
ANSIBLE_COMMAND_WARNINGS
Ansible can issue a warning when the shell or command module is used and the command appears to be similar to an existing Ansible module.These warnings can be silenced by adjusting this setting to False. You can also control this at the task level with the module option warn
.As of version 2.11, this is disabled by default.
See also COMMAND_WARNINGS
ANSIBLE_LOCALHOST_WARNING
By default Ansible will issue a warning when there are no hosts in the inventory.These warnings can be silenced by adjusting this setting to False.
See also LOCALHOST_WARNING
ANSIBLE_DOC_FRAGMENT_PLUGINS
Colon separated paths in which Ansible will search for Documentation Fragments Plugins.
See also DOC_FRAGMENT_PLUGIN_PATH
ANSIBLE_ACTION_PLUGINS
Colon separated paths in which Ansible will search for Action Plugins.
See also DEFAULT_ACTION_PLUGIN_PATH
ANSIBLE_ASK_PASS
This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probably do not needed to change this setting.
See also DEFAULT_ASK_PASS
ANSIBLE_ASK_VAULT_PASS
This controls whether an Ansible playbook should prompt for a vault password.
See also DEFAULT_ASK_VAULT_PASS
ANSIBLE_BECOME
Toggles the use of privilege escalation, allowing you to ‘become’ another user after login.
See also DEFAULT_BECOME
ANSIBLE_BECOME_ASK_PASS
Toggle to prompt for privilege escalation password.
See also DEFAULT_BECOME_ASK_PASS
ANSIBLE_BECOME_METHOD
Privilege escalation method to use when become
is enabled.
See also DEFAULT_BECOME_METHOD
ANSIBLE_BECOME_EXE
executable to use for privilege escalation, otherwise Ansible will depend on PATH
See also DEFAULT_BECOME_EXE
ANSIBLE_BECOME_FLAGS
Flags to pass to the privilege escalation executable.
See also DEFAULT_BECOME_FLAGS
ANSIBLE_BECOME_PLUGINS
Colon separated paths in which Ansible will search for Become Plugins.
See also BECOME_PLUGIN_PATH
ANSIBLE_BECOME_USER
The user your login/remote user ‘becomes’ when using privilege escalation, most systems will use ‘root’ when no user is specified.
See also DEFAULT_BECOME_USER
ANSIBLE_CACHE_PLUGINS
Colon separated paths in which Ansible will search for Cache Plugins.
See also DEFAULT_CACHE_PLUGIN_PATH
ANSIBLE_CALLABLE_WHITELIST
Whitelist of callable methods to be made available to template evaluation
See also CALLABLE_ACCEPT_LIST
2.15
normalizing names to new standard
ANSIBLE_CALLABLE_ENABLED
ANSIBLE_CALLABLE_ENABLED
Whitelist of callable methods to be made available to template evaluation
See also CALLABLE_ACCEPT_LIST
2.11
ANSIBLE_CONTROLLER_PYTHON_WARNING
Toggle to control showing warnings related to running a Python version older than Python 3.8 on the controller
See also CONTROLLER_PYTHON_WARNING
ANSIBLE_CALLBACK_PLUGINS
Colon separated paths in which Ansible will search for Callback Plugins.
See also DEFAULT_CALLBACK_PLUGIN_PATH
ANSIBLE_CALLBACK_WHITELIST
List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don’t want them activated by default.
See also CALLBACKS_ENABLED
2.15
normalizing names to new standard
ANSIBLE_CALLBACKS_ENABLED
ANSIBLE_CALLBACKS_ENABLED
List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don’t want them activated by default.
See also CALLBACKS_ENABLED
2.11
ANSIBLE_CLICONF_PLUGINS
Colon separated paths in which Ansible will search for Cliconf Plugins.
See also DEFAULT_CLICONF_PLUGIN_PATH
ANSIBLE_CONNECTION_PLUGINS
Colon separated paths in which Ansible will search for Connection Plugins.
See also DEFAULT_CONNECTION_PLUGIN_PATH
ANSIBLE_DEBUG
Toggles debug output in Ansible. This is very verbose and can hinder multiprocessing. Debug output can also include secret information despite no_log settings being enabled, which means debug mode should not be used in production.
See also DEFAULT_DEBUG
ANSIBLE_EXECUTABLE
This indicates the command to use to spawn a shell under for Ansible’s execution needs on a target. Users may need to change this in rare instances when shell usage is constrained, but in most cases it may be left as is.
See also DEFAULT_EXECUTABLE
ANSIBLE_FACT_PATH
This option allows you to globally configure a custom path for ‘local_facts’ for the implied M(ansible.builtin.setup) task when using fact gathering.If not set, it will fallback to the default from the M(ansible.builtin.setup) module: /etc/ansible/facts.d
.This does not affect user defined tasks that use the M(ansible.builtin.setup) module.
See also DEFAULT_FACT_PATH
ANSIBLE_FILTER_PLUGINS
Colon separated paths in which Ansible will search for Jinja2 Filter Plugins.
See also DEFAULT_FILTER_PLUGIN_PATH
ANSIBLE_FORCE_HANDLERS
This option controls if notified handlers run on a host even if a failure occurs on that host.When false, the handlers will not run if a failure has occurred on a host.This can also be set per play or on the command line. See Handlers and Failure for more details.
See also DEFAULT_FORCE_HANDLERS
ANSIBLE_FORKS
Maximum number of forks Ansible will use to execute tasks on target hosts.
See also DEFAULT_FORKS
ANSIBLE_GATHERING
This setting controls the default policy of fact gathering (facts discovered about remote systems).When ‘implicit’ (the default), the cache plugin will be ignored and facts will be gathered per play unless ‘gather_facts: False’ is set.When ‘explicit’ the inverse is true, facts will not be gathered unless directly requested in the play.The ‘smart’ value means each new host that has no facts discovered will be scanned, but if the same host is addressed in multiple plays it will not be contacted again in the playbook run.This option can be useful for those wishing to save fact gathering time. Both ‘smart’ and ‘explicit’ will use the cache plugin.
See also DEFAULT_GATHERING
ANSIBLE_GATHER_SUBSET
Set the gather_subset
option for the M(ansible.builtin.setup) task in the implicit fact gathering. See the module documentation for specifics.It does not apply to user defined M(ansible.builtin.setup) tasks.
See also DEFAULT_GATHER_SUBSET
ANSIBLE_GATHER_TIMEOUT
Set the timeout in seconds for the implicit fact gathering.It does not apply to user defined M(ansible.builtin.setup) tasks.
See also DEFAULT_GATHER_TIMEOUT
ANSIBLE_HANDLER_INCLUDES_STATIC
Since 2.0 M(ansible.builtin.include) can be ‘dynamic’, this setting (if True) forces that if the include appears in a handlers
section to be ‘static’.
See also DEFAULT_HANDLER_INCLUDES_STATIC
ANSIBLE_HASH_BEHAVIOUR
This setting controls how duplicate definitions of dictionary variables (aka hash, map, associative array) are handled in Ansible.This does not affect variables whose values are scalars (integers, strings) or arrays.**WARNING**, changing this setting is not recommended as this is fragile and makes your content (plays, roles, collections) non portable, leading to continual confusion and misuse. Don’t change this setting unless you think you have an absolute need for it.We recommend avoiding reusing variable names and relying on the combine
filter and vars
and varnames
lookups to create merged versions of the individual variables. In our experience this is rarely really needed and a sign that too much complexity has been introduced into the data structures and plays.For some uses you can also look into custom vars_plugins to merge on input, even substituting the default host_group_vars
that is in charge of parsing the host_vars/
and group_vars/
directories. Most users of this setting are only interested in inventory scope, but the setting itself affects all sources and makes debugging even harder.All playbooks and roles in the official examples repos assume the default for this setting.Changing the setting to merge
applies across variable sources, but many sources will internally still overwrite the variables. For example include_vars
will dedupe variables internally before updating Ansible, with ‘last defined’ overwriting previous definitions in same file.The Ansible project recommends you avoid ``merge`` for new projects.**It is the intention of the Ansible developers to eventually deprecate and remove this setting, but it is being kept as some users do heavily rely on it. New projects should **avoid ‘merge’.
See also DEFAULT_HASH_BEHAVIOUR
ANSIBLE_INVENTORY
Comma separated list of Ansible inventory sources
See also DEFAULT_HOST_LIST
ANSIBLE_HTTPAPI_PLUGINS
Colon separated paths in which Ansible will search for HttpApi Plugins.
See also DEFAULT_HTTPAPI_PLUGIN_PATH
ANSIBLE_INVENTORY_PLUGINS
Colon separated paths in which Ansible will search for Inventory Plugins.
See also DEFAULT_INVENTORY_PLUGIN_PATH
ANSIBLE_JINJA2_EXTENSIONS
This is a developer-specific feature that allows enabling additional Jinja2 extensions.See the Jinja2 documentation for details. If you do not know what these do, you probably don’t need to change this setting :)
See also DEFAULT_JINJA2_EXTENSIONS
ANSIBLE_JINJA2_NATIVE
This option preserves variable types during template operations. This requires Jinja2 >= 2.10.
See also DEFAULT_JINJA2_NATIVE
ANSIBLE_KEEP_REMOTE_FILES
Enables/disables the cleaning up of the temporary files Ansible used to execute the tasks on the remote.If this option is enabled it will disable ANSIBLE_PIPELINING
.
See also DEFAULT_KEEP_REMOTE_FILES
LIBVIRT_LXC_NOSECLABEL
This setting causes libvirt to connect to lxc containers by passing –noseclabel to virsh. This is necessary when running on systems which do not have SELinux.
See also DEFAULT_LIBVIRT_LXC_NOSECLABEL
2.12
environment variables without ANSIBLE_
prefix are deprecated
the ANSIBLE_LIBVIRT_LXC_NOSECLABEL
environment variable
ANSIBLE_LIBVIRT_LXC_NOSECLABEL
This setting causes libvirt to connect to lxc containers by passing –noseclabel to virsh. This is necessary when running on systems which do not have SELinux.
See also DEFAULT_LIBVIRT_LXC_NOSECLABEL
ANSIBLE_LOAD_CALLBACK_PLUGINS
Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from the command line, send notifications, and so on. Callback plugins are always loaded for ansible-playbook
.
See also DEFAULT_LOAD_CALLBACK_PLUGINS
ANSIBLE_LOCAL_TEMP
Temporary directory for Ansible to use on the controller.
See also DEFAULT_LOCAL_TMP
ANSIBLE_LOG_PATH
File to which Ansible will log on the controller. When empty logging is disabled.
See also DEFAULT_LOG_PATH
ANSIBLE_LOG_FILTER
List of logger names to filter out of the log file
See also DEFAULT_LOG_FILTER
ANSIBLE_LOOKUP_PLUGINS
Colon separated paths in which Ansible will search for Lookup Plugins.
See also DEFAULT_LOOKUP_PLUGIN_PATH
ANSIBLE_MODULE_ARGS
This sets the default arguments to pass to the ansible
adhoc binary if no -a
is specified.
See also DEFAULT_MODULE_ARGS
ANSIBLE_LIBRARY
Colon separated paths in which Ansible will search for Modules.
See also DEFAULT_MODULE_PATH
ANSIBLE_MODULE_UTILS
Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.
See also DEFAULT_MODULE_UTILS_PATH
ANSIBLE_NETCONF_PLUGINS
Colon separated paths in which Ansible will search for Netconf Plugins.
See also DEFAULT_NETCONF_PLUGIN_PATH
ANSIBLE_NO_LOG
Toggle Ansible’s display and logging of task details, mainly used to avoid security disclosures.
See also DEFAULT_NO_LOG
ANSIBLE_NO_TARGET_SYSLOG
Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer style PowerShell modules from writting to the event log.
See also DEFAULT_NO_TARGET_SYSLOG
ANSIBLE_NULL_REPRESENTATION
What templating should return as a ‘null’ value. When not set it will let Jinja2 decide.
See also DEFAULT_NULL_REPRESENTATION
ANSIBLE_POLL_INTERVAL
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how often to check back on the status of those tasks when an explicit poll interval is not supplied. The default is a reasonably moderate 15 seconds which is a tradeoff between checking in frequently and providing a quick turnaround when something may have completed.
See also DEFAULT_POLL_INTERVAL
ANSIBLE_PRIVATE_KEY_FILE
Option for connections using a certificate or key file to authenticate, rather than an agent or passwords, you can set the default value here to avoid re-specifying –private-key with every invocation.
See also DEFAULT_PRIVATE_KEY_FILE
ANSIBLE_PRIVATE_ROLE_VARS
Makes role variables inaccessible from other roles.This was introduced as a way to reset role variables to default values if a role is used more than once in a playbook.
See also DEFAULT_PRIVATE_ROLE_VARS
ANSIBLE_REMOTE_PORT
Port to use in remote connections, when blank it will use the connection plugin default.
See also DEFAULT_REMOTE_PORT
ANSIBLE_REMOTE_USER
Sets the login user for the target machinesWhen blank it uses the connection plugin’s default, normally the user currently executing Ansible.
See also DEFAULT_REMOTE_USER
ANSIBLE_ROLES_PATH
Colon separated paths in which Ansible will search for Roles.
See also DEFAULT_ROLES_PATH
ANSIBLE_SCP_IF_SSH
Preferred method to use when transferring files over ssh.When set to smart, Ansible will try them until one succeeds or they all fail.If set to True, it will force ‘scp’, if False it will use ‘sftp’.
See also DEFAULT_SCP_IF_SSH
ANSIBLE_SELINUX_SPECIAL_FS
Some filesystems do not support safe operations and/or return inconsistent errors, this setting makes Ansible ‘tolerate’ those in the list w/o causing fatal errors.Data corruption may occur and writes are not always verified when a filesystem is in the list.
See also DEFAULT_SELINUX_SPECIAL_FS
2.9
ANSIBLE_SFTP_BATCH_MODE
See also DEFAULT_SFTP_BATCH_MODE
ANSIBLE_SSH_TRANSFER_METHOD
unused?
See also DEFAULT_SSH_TRANSFER_METHOD
ANSIBLE_STDOUT_CALLBACK
Set the main callback used to display Ansible output, you can only have one at a time.You can have many other callbacks, but just one can be in charge of stdout.
See also DEFAULT_STDOUT_CALLBACK
ANSIBLE_ENABLE_TASK_DEBUGGER
Whether or not to enable the task debugger, this previously was done as a strategy plugin.Now all strategy plugins can inherit this behavior. The debugger defaults to activating whena task is failed on unreachable. Use the debugger keyword for more flexibility.
See also ENABLE_TASK_DEBUGGER
ANSIBLE_TASK_DEBUGGER_IGNORE_ERRORS
This option defines whether the task debugger will be invoked on a failed task when ignore_errors=True is specified.True specifies that the debugger will honor ignore_errors, False will not honor ignore_errors.
See also TASK_DEBUGGER_IGNORE_ERRORS
ANSIBLE_STRATEGY
Set the default strategy used for plays.
See also DEFAULT_STRATEGY
ANSIBLE_STRATEGY_PLUGINS
Colon separated paths in which Ansible will search for Strategy Plugins.
See also DEFAULT_STRATEGY_PLUGIN_PATH
ANSIBLE_SU
Toggle the use of “su” for tasks.
See also DEFAULT_SU
ANSIBLE_SYSLOG_FACILITY
Syslog facility to use when Ansible logs to the remote target
See also DEFAULT_SYSLOG_FACILITY
ANSIBLE_TASK_INCLUDES_STATIC
The include
tasks can be static or dynamic, this toggles the default expected behaviour if autodetection fails and it is not explicitly set in task.
See also DEFAULT_TASK_INCLUDES_STATIC
ANSIBLE_TERMINAL_PLUGINS
Colon separated paths in which Ansible will search for Terminal Plugins.
See also DEFAULT_TERMINAL_PLUGIN_PATH
ANSIBLE_TEST_PLUGINS
Colon separated paths in which Ansible will search for Jinja2 Test Plugins.
See also DEFAULT_TEST_PLUGIN_PATH
ANSIBLE_TIMEOUT
This is the default timeout for connection plugins to use.
See also DEFAULT_TIMEOUT
ANSIBLE_TRANSPORT
Default connection plugin to use, the ‘smart’ option will toggle between ‘ssh’ and ‘paramiko’ depending on controller OS and ssh versions
See also DEFAULT_TRANSPORT
ANSIBLE_ERROR_ON_UNDEFINED_VARS
When True, this causes ansible templating to fail steps that reference variable names that are likely typoed.Otherwise, any ‘{{ template_expression }}’ that contains undefined variables will be rendered in a template or ansible action line exactly as written.
See also DEFAULT_UNDEFINED_VAR_BEHAVIOR
ANSIBLE_VARS_PLUGINS
Colon separated paths in which Ansible will search for Vars Plugins.
See also DEFAULT_VARS_PLUGIN_PATH
ANSIBLE_VAULT_ID_MATCH
If true, decrypting vaults with a vault id will only try the password from the matching vault-id
See also DEFAULT_VAULT_ID_MATCH
ANSIBLE_VAULT_IDENTITY
The label to use for the default vault id label in cases where a vault id label is not provided
See also DEFAULT_VAULT_IDENTITY
ANSIBLE_VAULT_ENCRYPT_IDENTITY
The vault_id to use for encrypting by default. If multiple vault_ids are provided, this specifies which to use for encryption. The –encrypt-vault-id cli option overrides the configured value.
See also DEFAULT_VAULT_ENCRYPT_IDENTITY
ANSIBLE_VAULT_IDENTITY_LIST
A list of vault-ids to use by default. Equivalent to multiple –vault-id args. Vault-ids are tried in order.
See also DEFAULT_VAULT_IDENTITY_LIST
ANSIBLE_VAULT_PASSWORD_FILE
The vault password file to use. Equivalent to –vault-password-file or –vault-id
See also DEFAULT_VAULT_PASSWORD_FILE
ANSIBLE_VERBOSITY
Sets the default verbosity, equivalent to the number of -v
passed in the command line.
See also DEFAULT_VERBOSITY
ANSIBLE_DEPRECATION_WARNINGS
Toggle to control the showing of deprecation warnings
See also DEPRECATION_WARNINGS
ANSIBLE_DEVEL_WARNING
Toggle to control showing warnings related to running devel
See also DEVEL_WARNING
ANSIBLE_DIFF_ALWAYS
Configuration toggle to tell modules to show differences when in ‘changed’ status, equivalent to --diff
.
See also DIFF_ALWAYS
ANSIBLE_DIFF_CONTEXT
How many lines of context to show when displaying the differences between files.
See also DIFF_CONTEXT
ANSIBLE_DISPLAY_ARGS_TO_STDOUT
Normally ansible-playbook
will print a header for each task that is run. These headers will contain the name: field from the task if you specified one. If you didn’t then ansible-playbook
uses the task’s action to help you tell which task is presently running. Sometimes you run many of the same action and so you want more information about the task to differentiate it from others of the same action. If you set this variable to True in the config then ansible-playbook
will also include the task’s arguments in the header.This setting defaults to False because there is a chance that you have sensitive values in your parameters and you do not want those to be printed.If you set this to True you should be sure that you have secured your environment’s stdout (no one can shoulder surf your screen and you aren’t saving stdout to an insecure file) or made sure that all of your playbooks explicitly added the no_log: True
parameter to tasks which have sensitive values See How do I keep secret data in my playbook? for more information.
See also DISPLAY_ARGS_TO_STDOUT
DISPLAY_SKIPPED_HOSTS
Toggle to control displaying skipped task/host entries in a task in the default callback
See also DISPLAY_SKIPPED_HOSTS
2.12
environment variables without ANSIBLE_
prefix are deprecated
the ANSIBLE_DISPLAY_SKIPPED_HOSTS
environment variable
ANSIBLE_DISPLAY_SKIPPED_HOSTS
Toggle to control displaying skipped task/host entries in a task in the default callback
See also DISPLAY_SKIPPED_HOSTS
ANSIBLE_DUPLICATE_YAML_DICT_KEY
By default Ansible will issue a warning when a duplicate dict key is encountered in YAML.These warnings can be silenced by adjusting this setting to False.
See also DUPLICATE_YAML_DICT_KEY
ANSIBLE_ERROR_ON_MISSING_HANDLER
Toggle to allow missing handlers to become a warning instead of an error when notifying.
See also ERROR_ON_MISSING_HANDLER
ANSIBLE_CONNECTION_FACTS_MODULES
Which modules to run during a play’s fact gathering stage based on connection
See also CONNECTION_FACTS_MODULES
ANSIBLE_FACTS_MODULES
Which modules to run during a play’s fact gathering stage, using the default of ‘smart’ will try to figure it out based on connection type.
See also FACTS_MODULES
ANSIBLE_GALAXY_IGNORE
If set to yes, ansible-galaxy will not validate TLS certificates. This can be useful for testing against a server with a self-signed certificate.
See also GALAXY_IGNORE_CERTS
ANSIBLE_GALAXY_ROLE_SKELETON
Role or collection skeleton directory to use as a template for the init
action in ansible-galaxy
, same as --role-skeleton
.
See also GALAXY_ROLE_SKELETON
ANSIBLE_GALAXY_ROLE_SKELETON_IGNORE
patterns of files to ignore inside a Galaxy role or collection skeleton directory
See also GALAXY_ROLE_SKELETON_IGNORE
ANSIBLE_GALAXY_SERVER
URL to prepend when roles don’t specify the full URI, assume they are referencing this server as the source.
See also GALAXY_SERVER
ANSIBLE_GALAXY_SERVER_LIST
A list of Galaxy servers to use when installing a collection.The value corresponds to the config ini header [galaxy_server.{{item}}]
which defines the server details.See Configuring the ansible-galaxy client for more details on how to define a Galaxy server.The order of servers in this list is used to as the order in which a collection is resolved.Setting this config option will ignore the GALAXY_SERVER config option.
See also GALAXY_SERVER_LIST
ANSIBLE_GALAXY_TOKEN_PATH
Local path to galaxy access token file
See also GALAXY_TOKEN_PATH
ANSIBLE_GALAXY_DISPLAY_PROGRESS
Some steps in ansible-galaxy
display a progress wheel which can cause issues on certain displays or when outputing the stdout to a file.This config option controls whether the display wheel is shown or not.The default is to show the display wheel if stdout has a tty.
See also GALAXY_DISPLAY_PROGRESS
ANSIBLE_GALAXY_CACHE_DIR
The directory that stores cached responses from a Galaxy server.This is only used by the ansible-galaxy collection install
and download
commands.Cache files inside this dir will be ignored if they are world writable.
See also GALAXY_CACHE_DIR
ANSIBLE_HOST_KEY_CHECKING
Set this to “False” if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host
See also HOST_KEY_CHECKING
ANSIBLE_HOST_PATTERN_MISMATCH
This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore it
See also HOST_PATTERN_MISMATCH
ANSIBLE_PYTHON_INTERPRETER
Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are auto
, auto_silent
, and auto_legacy
(the default). All discovery modes employ a lookup table to use the included system Python (on distributions known to include one), falling back to a fixed ordered list of well-known Python interpreter locations if a platform-specific default is not available. The fallback behavior will issue a warning that the interpreter should be set explicitly (since interpreters installed later may change which one is used). This warning behavior can be disabled by setting auto_silent
. The default value of auto_legacy
provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to /usr/bin/python
, will use that interpreter if present (and issue a warning that the default behavior will change to that of auto
in a future Ansible release.
See also INTERPRETER_PYTHON
ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS
Make ansible transform invalid characters in group names supplied by inventory sources.If ‘never’ it will allow for the group name but warn about the issue.When ‘ignore’, it does the same as ‘never’, without issuing a warning.When ‘always’ it will replace any invalid characters with ‘_’ (underscore) and warn the userWhen ‘silently’, it does the same as ‘always’, without issuing a warning.
See also TRANSFORM_INVALID_GROUP_CHARS
ANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED
If ‘false’, invalid attributes for a task will result in warnings instead of errors
See also INVALID_TASK_ATTRIBUTE_FAILED
ANSIBLE_INVENTORY_ANY_UNPARSED_IS_FAILED
If ‘true’, it is a fatal error when any given inventory source cannot be successfully parsed by any available inventory plugin; otherwise, this situation only attracts a warning.
See also INVENTORY_ANY_UNPARSED_IS_FAILED
ANSIBLE_INVENTORY_CACHE
Toggle to turn on inventory caching
See also INVENTORY_CACHE_ENABLED
ANSIBLE_INVENTORY_CACHE_PLUGIN
The plugin for caching inventory. If INVENTORY_CACHE_PLUGIN is not provided CACHE_PLUGIN can be used instead.
See also INVENTORY_CACHE_PLUGIN
ANSIBLE_INVENTORY_CACHE_CONNECTION
The inventory cache connection. If INVENTORY_CACHE_PLUGIN_CONNECTION is not provided CACHE_PLUGIN_CONNECTION can be used instead.
See also INVENTORY_CACHE_PLUGIN_CONNECTION
ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
The table prefix for the cache plugin. If INVENTORY_CACHE_PLUGIN_PREFIX is not provided CACHE_PLUGIN_PREFIX can be used instead.
See also INVENTORY_CACHE_PLUGIN_PREFIX
ANSIBLE_INVENTORY_CACHE_TIMEOUT
Expiration timeout for the inventory cache plugin data. If INVENTORY_CACHE_TIMEOUT is not provided CACHE_TIMEOUT can be used instead.
See also INVENTORY_CACHE_TIMEOUT
ANSIBLE_INVENTORY_ENABLED
List of enabled inventory plugins, it also determines the order in which they are used.
See also INVENTORY_ENABLED
ANSIBLE_INVENTORY_EXPORT
Controls if ansible-inventory will accurately reflect Ansible’s view into inventory or its optimized for exporting.
See also INVENTORY_EXPORT
ANSIBLE_INVENTORY_IGNORE
List of extensions to ignore when using a directory as an inventory source
See also INVENTORY_IGNORE_EXTS
ANSIBLE_INVENTORY_IGNORE_REGEX
List of patterns to ignore when using a directory as an inventory source
See also INVENTORY_IGNORE_PATTERNS
ANSIBLE_INVENTORY_UNPARSED_FAILED
If ‘true’ it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning.
See also INVENTORY_UNPARSED_IS_FAILED
ANSIBLE_MAX_DIFF_SIZE
Maximum size of files to be considered for diff display
See also MAX_FILE_SIZE_FOR_DIFF
NETWORK_GROUP_MODULES
See also NETWORK_GROUP_MODULES
2.12
environment variables without ANSIBLE_
prefix are deprecated
the ANSIBLE_NETWORK_GROUP_MODULES
environment variable
ANSIBLE_NETWORK_GROUP_MODULES
See also NETWORK_GROUP_MODULES
ANSIBLE_INJECT_FACT_VARS
Facts are available inside the ansible_facts
variable, this setting also pushes them as their own vars in the main namespace.Unlike inside the ansible_facts
dictionary, these will have an ansible_
prefix.
See also INJECT_FACTS_AS_VARS
ANSIBLE_MODULE_IGNORE_EXTS
List of extensions to ignore when looking for modules to loadThis is for rejecting script and binary module fallback extensions
See also MODULE_IGNORE_EXTS
ANSIBLE_OLD_PLUGIN_CACHE_CLEAR
Previouslly Ansible would only clear some of the plugin loading caches when loading new roles, this led to some behaviours in which a plugin loaded in prevoius plays would be unexpectedly ‘sticky’. This setting allows to return to that behaviour.
See also OLD_PLUGIN_CACHE_CLEARING
ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
See also PARAMIKO_HOST_KEY_AUTO_ADD
ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
See also PARAMIKO_LOOK_FOR_KEYS
ANSIBLE_PERSISTENT_CONTROL_PATH_DIR
Path to socket to be used by the connection persistence system.
See also PERSISTENT_CONTROL_PATH_DIR
ANSIBLE_PERSISTENT_CONNECT_TIMEOUT
This controls how long the persistent connection will remain idle before it is destroyed.
See also PERSISTENT_CONNECT_TIMEOUT
ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT
This controls the retry timeout for persistent connection to connect to the local domain socket.
See also PERSISTENT_CONNECT_RETRY_TIMEOUT
ANSIBLE_PERSISTENT_COMMAND_TIMEOUT
This controls the amount of time to wait for response from remote device before timing out persistent connection.
See also PERSISTENT_COMMAND_TIMEOUT
ANSIBLE_PLAYBOOK_DIR
A number of non-playbook CLIs have a --playbook-dir
argument; this sets the default value for it.
See also PLAYBOOK_DIR
ANSIBLE_PLAYBOOK_VARS_ROOT
This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host_vars/group_varsThe top
option follows the traditional behaviour of using the top playbook in the chain to find the root directory.The bottom
option follows the 2.4.0 behaviour of using the current playbook to find the root directory.The all
option examines from the first parent to the current playbook.
See also PLAYBOOK_VARS_ROOT
ANSIBLE_PYTHON_MODULE_RLIMIT_NOFILE
Attempts to set RLIMIT_NOFILE soft limit to the specified value when executing Python modules (can speed up subprocess usage on Python 2.x. See https://bugs.python.org/issue11284). The value will be limited by the existing hard limit. Default value of 0 does not attempt to adjust existing system-defined limits.
See also PYTHON_MODULE_RLIMIT_NOFILE
ANSIBLE_RETRY_FILES_ENABLED
This controls whether a failed Ansible playbook should create a .retry file.
See also RETRY_FILES_ENABLED
ANSIBLE_RETRY_FILES_SAVE_PATH
This sets the path in which Ansible will save .retry files when a playbook fails and retry files are enabled.This file will be overwritten after each run with the list of failed hosts from all plays.
See also RETRY_FILES_SAVE_PATH
ANSIBLE_RUN_VARS_PLUGINS
This setting can be used to optimize vars_plugin usage depending on user’s inventory size and play selection.Setting to C(demand) will run vars_plugins relative to inventory sources anytime vars are ‘demanded’ by tasks.Setting to C(start) will run vars_plugins relative to inventory sources after importing that inventory source.
See also RUN_VARS_PLUGINS
ANSIBLE_SHOW_CUSTOM_STATS
This adds the custom stats set via the set_stats plugin to the default output
See also SHOW_CUSTOM_STATS
ANSIBLE_STRING_TYPE_FILTERS
This list of filters avoids ‘type conversion’ when templating variablesUseful when you want to avoid conversion into lists or dictionaries for JSON strings, for example.
See also STRING_TYPE_FILTERS
ANSIBLE_SYSTEM_WARNINGS
Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts)These may include warnings about 3rd party packages or other conditions that should be resolved if possible.
See also SYSTEM_WARNINGS
ANSIBLE_RUN_TAGS
default list of tags to run in your plays, Skip Tags has precedence.
See also TAGS_RUN
ANSIBLE_SKIP_TAGS
default list of tags to skip in your plays, has precedence over Run Tags
See also TAGS_SKIP
ANSIBLE_TASK_TIMEOUT
Set the maximum time (in seconds) that a task can run for.If set to 0 (the default) there is no timeout.
See also TASK_TIMEOUT
ANSIBLE_WORKER_SHUTDOWN_POLL_COUNT
The maximum number of times to check Task Queue Manager worker processes to verify they have exited cleanly.After this limit is reached any worker processes still running will be terminated.This is for internal use only.
See also WORKER_SHUTDOWN_POLL_COUNT
ANSIBLE_WORKER_SHUTDOWN_POLL_DELAY
The number of seconds to sleep between polling loops when checking Task Queue Manager worker processes to verify they have exited cleanly.This is for internal use only.
See also WORKER_SHUTDOWN_POLL_DELAY
ANSIBLE_USE_PERSISTENT_CONNECTIONS
Toggles the use of persistence for connections.
See also USE_PERSISTENT_CONNECTIONS
ANSIBLE_VARS_ENABLED
Whitelist for variable plugins that require it.
See also VARIABLE_PLUGINS_ENABLED
ANSIBLE_PRECEDENCE
Allows to change the group variable precedence merge order.
See also VARIABLE_PRECEDENCE
ANSIBLE_WIN_ASYNC_STARTUP_TIMEOUT
For asynchronous tasks in Ansible (covered in Asynchronous Actions and Polling), this is how long, in seconds, to wait for the task spawned by Ansible to connect back to the named pipe used on Windows systems. The default is 5 seconds. This can be too low on slower systems, or systems under heavy load.This is not the total time an async command can run for, but is a separate timeout to wait for an async command to start. The task will only start to be timed against its async_timeout once it has connected to the pipe, so the overall maximum duration the task can take will be extended by the amount specified here.
See also WIN_ASYNC_STARTUP_TIMEOUT
ANSIBLE_YAML_FILENAME_EXT
Check all of these extensions when looking for ‘variable’ files which should be YAML or JSON or vaulted versions of these.This affects vars_files, include_vars, inventory and vars plugins among others.
See also YAML_FILENAME_EXTENSIONS
ANSIBLE_NETCONF_SSH_CONFIG
This variable is used to enable bastion/jump host with netconf connection. If set to True the bastion/jump host ssh settings should be present in ~/.ssh/config file, alternatively it can be set to custom ssh configuration file path to read the bastion/jump host settings.
See also NETCONF_SSH_CONFIG
ANSIBLE_STRING_CONVERSION_ACTION
Action to take when a module parameter value is converted to a string (this does not affect variables). For string parameters, values such as ‘1.00’, “[‘a’, ‘b’,]”, and ‘yes’, ‘y’, etc. will be converted by the YAML parser unless fully quoted.Valid options are ‘error’, ‘warn’, and ‘ignore’.Since 2.8, this option defaults to ‘warn’ but will change to ‘error’ in 2.12.
See also STRING_CONVERSION_ACTION
ANSIBLE_VERBOSE_TO_STDERR
Force ‘verbose’ option to use stderr instead of stdout
See also VERBOSE_TO_STDERR
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/reference_appendices/config.html