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.
The configuration file
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
Avoiding security risks with ansible.cfg
in the current directory
If 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:
- for Vagrant, the Vagrant documentation covers synced folder permissions.
- for WSL, the WSL docs and this Microsoft blog post cover mount options.
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.
Relative paths for configuration
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
.
Common Options
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.
ACTION_WARNINGS
Description
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.Type
booleanDefault
True
Version Added
2.5IniSection
[defaults]Key
action_warningsEnvironmentVariable
AGNOSTIC_BECOME_PROMPT
Description
Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become methodType
booleanDefault
True
Version Added
2.5IniSection
[privilege_escalation]Key
agnostic_become_promptEnvironmentVariable
ANSIBLE_AGNOSTIC_BECOME_PROMPT
ALLOW_WORLD_READABLE_TMPFILES
Description
This setting has been moved to the individual shell plugins as a plugin option Shell plugins. The existing configuration settings are still accepted with the shell plugin adding additional options, like variables. This message will be removed in 2.14.Type
booleanDefault
False
Deprecated in
2.14Deprecated detail
moved to shell pluginsDeprecated alternatives
world_readable_tmp
ANSIBLE_CONNECTION_PATH
Description
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.Type
pathDefault
None
Version Added
2.8IniSection
[persistent_connection]Key
ansible_connection_pathEnvironmentVariable
ANSIBLE_COW_ACCEPTLIST
Description
White list of cowsay templates that are ‘safe’ to use, set to empty list if you want to enable all installed templates.Type
listDefault
['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']
Ini
- Section[defaults]Keycow_whitelistDeprecated in2.15Deprecated detailnormalizing names to new standardDeprecated alternativescowsay_enabled_stencils
- Section[defaults]Keycowsay_enabled_stencilsVersion Added2.11
Environment
- Variable
ANSIBLE_COW_ACCEPTLIST
Version Added2.11 - Variable
ANSIBLE_COW_WHITELIST
Deprecated in2.15Deprecated detailnormalizing names to new standardDeprecated alternativesANSIBLE_COW_ACCEPTLIST
ANSIBLE_COW_PATH
Description
Specify a custom cowsay path or swap in your cowsay implementation of choiceType
stringDefault
None
IniSection
[defaults]Key
cowpathEnvironmentVariable
ANSIBLE_COW_SELECTION
Description
This allows you to chose a specific cowsay stencil for the banners or use ‘random’ to cycle through them.Default
default
IniSection
[defaults]Key
cow_selectionEnvironmentVariable
ANSIBLE_FORCE_COLOR
Description
This option forces color mode even when running without a TTY or the “nocolor” setting is True.Type
booleanDefault
False
IniSection
[defaults]Key
force_colorEnvironmentVariable
ANSIBLE_NOCOLOR
Description
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.Type
booleanDefault
False
IniSection
[defaults]Key
nocolorEnvironment
- Variable
ANSIBLE_NOCOLOR
- Variable
NO_COLOR
Version Added2.11
ANSIBLE_NOCOWS
Description
If you have cowsay installed but want to avoid the ‘cows’ (why????), use this.Type
booleanDefault
False
IniSection
[defaults]Key
nocowsEnvironmentVariable
ANSIBLE_PIPELINING
Description
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.Type
booleanDefault
False
Ini
- Section[connection]Keypipelining
- Section[defaults]Keypipelining
EnvironmentVariable
ANY_ERRORS_FATAL
Description
Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.Type
booleanDefault
False
Version Added
2.4IniSection
[defaults]Key
any_errors_fatalEnvironmentVariable
BECOME_ALLOW_SAME_USER
Description
This setting controls if become is skipped when remote user and become user are the same. I.E root sudo to root. If executable, it will be run and the resulting stdout will be used as the password.Type
booleanDefault
False
IniSection
[privilege_escalation]Key
become_allow_same_userEnvironmentVariable
ANSIBLE_BECOME_ALLOW_SAME_USER
BECOME_PASSWORD_FILE
Description
The password file to use for the become plugin. –become-password-file. If executable, it will be run and the resulting stdout will be used as the password.Type
pathDefault
None
Version Added
2.12IniSection
[defaults]Key
become_password_fileEnvironmentVariable
BECOME_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Become Plugins.Type
pathspecDefault
~/.ansible/plugins/become:/usr/share/ansible/plugins/become
Version Added
2.8IniSection
[defaults]Key
become_pluginsEnvironmentVariable
CACHE_PLUGIN
Description
Chooses which cache plugin to use, the default ‘memory’ is ephemeral.Default
memory
IniSection
[defaults]Key
fact_cachingEnvironmentVariable
CACHE_PLUGIN_CONNECTION
Description
Defines connection or path information for the cache pluginDefault
None
IniSection
[defaults]Key
fact_caching_connectionEnvironmentVariable
ANSIBLE_CACHE_PLUGIN_CONNECTION
CACHE_PLUGIN_PREFIX
Description
Prefix to use for cache plugin files/tablesDefault
ansible_facts
IniSection
[defaults]Key
fact_caching_prefixEnvironmentVariable
CACHE_PLUGIN_TIMEOUT
Description
Expiration timeout for the cache plugin dataType
integerDefault
86400
IniSection
[defaults]Key
fact_caching_timeoutEnvironmentVariable
CALLABLE_ACCEPT_LIST
Description
Whitelist of callable methods to be made available to template evaluationType
listDefault
[]
Ini
- Section[defaults]Keycallable_whitelistDeprecated in2.15Deprecated detailnormalizing names to new standardDeprecated alternativescallable_enabled
- Section[defaults]Keycallable_enabledVersion Added2.11
Environment
- Variable
ANSIBLE_CALLABLE_ENABLED
Version Added2.11 - Variable
ANSIBLE_CALLABLE_WHITELIST
Deprecated in2.15Deprecated detailnormalizing names to new standardDeprecated alternativesANSIBLE_CALLABLE_ENABLED
CALLBACKS_ENABLED
Description
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.Type
listDefault
[]
Ini
- Section[defaults]Keycallback_whitelistDeprecated in2.15Deprecated detailnormalizing names to new standardDeprecated alternativescallbacks_enabled
- Section[defaults]Keycallbacks_enabledVersion Added2.11
Environment
- Variable
ANSIBLE_CALLBACK_WHITELIST
Deprecated in2.15Deprecated detailnormalizing names to new standardDeprecated alternativesANSIBLE_CALLBACKS_ENABLED - Variable
ANSIBLE_CALLBACKS_ENABLED
Version Added2.11
COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH
Description
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.Default
warning
Choices
- error
- warning
- ignore
IniSection
[defaults]Key
collections_on_ansible_version_mismatchEnvironmentVariable
ANSIBLE_COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH
COLLECTIONS_PATHS
Description
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
.Type
pathspecDefault
~/.ansible/collections:/usr/share/ansible/collections
Ini
- Section[defaults]Keycollections_paths
- Section[defaults]Keycollections_pathVersion Added2.10
Environment
- Variable
ANSIBLE_COLLECTIONS_PATH
Version Added2.10 - Variable
ANSIBLE_COLLECTIONS_PATHS
COLLECTIONS_SCAN_SYS_PATH
Description
A boolean to enable or disable scanning the sys.path for installed collectionsType
booleanDefault
True
IniSection
[defaults]Key
collections_scan_sys_pathEnvironmentVariable
ANSIBLE_COLLECTIONS_SCAN_SYS_PATH
COLOR_CHANGED
Description
Defines the color to use on ‘Changed’ task statusDefault
yellow
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
changedEnvironmentVariable
COLOR_CONSOLE_PROMPT
Description
Defines the default color to use for ansible-consoleDefault
white
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
Version Added
2.7IniSection
[colors]Key
console_promptEnvironmentVariable
COLOR_DEBUG
Description
Defines the color to use when emitting debug messagesDefault
dark gray
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
debugEnvironmentVariable
COLOR_DEPRECATE
Description
Defines the color to use when emitting deprecation messagesDefault
purple
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
deprecateEnvironmentVariable
COLOR_DIFF_ADD
Description
Defines the color to use when showing added lines in diffsDefault
green
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
diff_addEnvironmentVariable
COLOR_DIFF_LINES
Description
Defines the color to use when showing diffsDefault
cyan
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
diff_linesEnvironmentVariable
COLOR_DIFF_REMOVE
Description
Defines the color to use when showing removed lines in diffsDefault
red
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
diff_removeEnvironmentVariable
COLOR_ERROR
Description
Defines the color to use when emitting error messagesDefault
red
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
errorEnvironmentVariable
COLOR_HIGHLIGHT
Description
Defines the color to use for highlightingDefault
white
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
highlightEnvironmentVariable
COLOR_OK
Description
Defines the color to use when showing ‘OK’ task statusDefault
green
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
okEnvironmentVariable
COLOR_SKIP
Description
Defines the color to use when showing ‘Skipped’ task statusDefault
cyan
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
skipEnvironmentVariable
COLOR_UNREACHABLE
Description
Defines the color to use on ‘Unreachable’ statusDefault
bright red
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
unreachableEnvironmentVariable
COLOR_VERBOSE
Description
Defines the color to use when emitting verbose messages. i.e those that show with ‘-v’s.Default
blue
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
verboseEnvironmentVariable
COLOR_WARN
Description
Defines the color to use when emitting warning messagesDefault
bright purple
Choices
- black
- bright gray
- blue
- white
- green
- bright blue
- cyan
- bright green
- red
- bright cyan
- purple
- bright red
- yellow
- bright purple
- dark gray
- bright yellow
- magenta
- bright magenta
- normal
IniSection
[colors]Key
warnEnvironmentVariable
COMMAND_WARNINGS
Description
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.Type
booleanDefault
False
Version Added
1.8IniSection
[defaults]Key
command_warningsEnvironmentVariable
ANSIBLE_COMMAND_WARNINGS
Deprecated in
2.14Deprecated detail
the command warnings feature is being removed
CONNECTION_FACTS_MODULES
Description
Which modules to run during a play’s fact gathering stage based on connectionType
dictDefault
{'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'}
CONNECTION_PASSWORD_FILE
Description
The password file to use for the connection plugin. –connection-password-file.Type
pathDefault
None
Version Added
2.12IniSection
[defaults]Key
connection_password_fileEnvironmentVariable
ANSIBLE_CONNECTION_PASSWORD_FILE
COVERAGE_REMOTE_OUTPUT
Description
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.Type
strVersion Added
2.9EnvironmentVariable
_ANSIBLE_COVERAGE_REMOTE_OUTPUT
Variablesname
_ansible_coverage_remote_output
COVERAGE_REMOTE_PATHS
Description
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.Type
strDefault
*
Version Added
2.9EnvironmentVariable
_ANSIBLE_COVERAGE_REMOTE_PATH_FILTER
DEFAULT_ACTION_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Action Plugins.Type
pathspecDefault
~/.ansible/plugins/action:/usr/share/ansible/plugins/action
IniSection
[defaults]Key
action_pluginsEnvironmentVariable
DEFAULT_ALLOW_UNSAFE_LOOKUPS
Description
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 backward 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 lateType
booleanDefault
False
Version Added
2.2.3IniSection
[defaults]Key
allow_unsafe_lookups
DEFAULT_ASK_PASS
Description
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.Type
booleanDefault
False
IniSection
[defaults]Key
ask_passEnvironmentVariable
DEFAULT_ASK_VAULT_PASS
Description
This controls whether an Ansible playbook should prompt for a vault password.Type
booleanDefault
False
IniSection
[defaults]Key
ask_vault_passEnvironmentVariable
DEFAULT_BECOME
Description
Toggles the use of privilege escalation, allowing you to ‘become’ another user after login.Type
booleanDefault
False
IniSection
[privilege_escalation]Key
becomeEnvironmentVariable
DEFAULT_BECOME_ASK_PASS
Description
Toggle to prompt for privilege escalation password.Type
booleanDefault
False
IniSection
[privilege_escalation]Key
become_ask_passEnvironmentVariable
DEFAULT_BECOME_EXE
Description
executable to use for privilege escalation, otherwise Ansible will depend on PATHDefault
None
IniSection
[privilege_escalation]Key
become_exeEnvironmentVariable
DEFAULT_BECOME_FLAGS
Description
Flags to pass to the privilege escalation executable.Default
None
IniSection
[privilege_escalation]Key
become_flagsEnvironmentVariable
DEFAULT_BECOME_METHOD
Description
Privilege escalation method to use when become is enabled.Default
sudo
IniSection
[privilege_escalation]Key
become_methodEnvironmentVariable
DEFAULT_BECOME_USER
Description
The user your login/remote user ‘becomes’ when using privilege escalation, most systems will use ‘root’ when no user is specified.Default
root
IniSection
[privilege_escalation]Key
become_userEnvironmentVariable
DEFAULT_CACHE_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Cache Plugins.Type
pathspecDefault
~/.ansible/plugins/cache:/usr/share/ansible/plugins/cache
IniSection
[defaults]Key
cache_pluginsEnvironmentVariable
DEFAULT_CALLBACK_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Callback Plugins.Type
pathspecDefault
~/.ansible/plugins/callback:/usr/share/ansible/plugins/callback
IniSection
[defaults]Key
callback_pluginsEnvironmentVariable
DEFAULT_CLICONF_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Cliconf Plugins.Type
pathspecDefault
~/.ansible/plugins/cliconf:/usr/share/ansible/plugins/cliconf
IniSection
[defaults]Key
cliconf_pluginsEnvironmentVariable
DEFAULT_CONNECTION_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Connection Plugins.Type
pathspecDefault
~/.ansible/plugins/connection:/usr/share/ansible/plugins/connection
IniSection
[defaults]Key
connection_pluginsEnvironmentVariable
DEFAULT_DEBUG
Description
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.Type
booleanDefault
False
IniSection
[defaults]Key
debugEnvironmentVariable
DEFAULT_EXECUTABLE
Description
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.Default
/bin/sh
IniSection
[defaults]Key
executableEnvironmentVariable
DEFAULT_FACT_PATH
Description
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.Type
stringDefault
None
IniSection
[defaults]Key
fact_pathEnvironmentVariable
DEFAULT_FILTER_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Jinja2 Filter Plugins.Type
pathspecDefault
~/.ansible/plugins/filter:/usr/share/ansible/plugins/filter
IniSection
[defaults]Key
filter_pluginsEnvironmentVariable
DEFAULT_FORCE_HANDLERS
Description
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.Type
booleanDefault
False
Version Added
1.9.1IniSection
[defaults]Key
force_handlersEnvironmentVariable
DEFAULT_FORKS
Description
Maximum number of forks Ansible will use to execute tasks on target hosts.Type
integerDefault
5
IniSection
[defaults]Key
forksEnvironmentVariable
DEFAULT_GATHER_SUBSET
Description
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.Type
listDefault
['all']
Version Added
2.1IniSection
[defaults]Key
gather_subsetEnvironmentVariable
DEFAULT_GATHER_TIMEOUT
Description
Set the timeout in seconds for the implicit fact gathering. It does not apply to user defined M(ansible.builtin.setup) tasks.Type
integerDefault
10
IniSection
[defaults]Key
gather_timeoutEnvironmentVariable
DEFAULT_GATHERING
Description
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.Default
implicit
Choices
- smart
- explicit
- implicit
Version Added
1.6IniSection
[defaults]Key
gatheringEnvironmentVariable
DEFAULT_HASH_BEHAVIOUR
Description
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’.Type
stringDefault
replace
Choices
- replaceAny variable that is defined more than once is overwritten using the order from variable precedence rules (highest wins).
- mergeAny dictionary variable will be recursively merged with new definitions across the different variable definition sources.
IniSection
[defaults]Key
hash_behaviourEnvironmentVariable
DEFAULT_HOST_LIST
Description
Comma separated list of Ansible inventory sourcesType
pathlistDefault
/etc/ansible/hosts
IniSection
[defaults]Key
inventoryEnvironmentVariable
DEFAULT_HTTPAPI_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for HttpApi Plugins.Type
pathspecDefault
~/.ansible/plugins/httpapi:/usr/share/ansible/plugins/httpapi
IniSection
[defaults]Key
httpapi_pluginsEnvironmentVariable
DEFAULT_INTERNAL_POLL_INTERVAL
Description
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.1Type
floatDefault
0.001
Version Added
2.2IniSection
[defaults]Key
internal_poll_interval
DEFAULT_INVENTORY_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Inventory Plugins.Type
pathspecDefault
~/.ansible/plugins/inventory:/usr/share/ansible/plugins/inventory
IniSection
[defaults]Key
inventory_pluginsEnvironmentVariable
DEFAULT_JINJA2_EXTENSIONS
Description
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 :)Default
[]
IniSection
[defaults]Key
jinja2_extensionsEnvironmentVariable
DEFAULT_JINJA2_NATIVE
Description
This option preserves variable types during template operations. This requires Jinja2 >= 2.10.Type
booleanDefault
False
Version Added
2.7IniSection
[defaults]Key
jinja2_nativeEnvironmentVariable
DEFAULT_KEEP_REMOTE_FILES
Description
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
.Type
booleanDefault
False
IniSection
[defaults]Key
keep_remote_filesEnvironmentVariable
DEFAULT_LIBVIRT_LXC_NOSECLABEL
Description
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.Type
booleanDefault
False
Version Added
2.1IniSection
[selinux]Key
libvirt_lxc_noseclabelEnvironment
- Variable
ANSIBLE_LIBVIRT_LXC_NOSECLABEL
- Variable
LIBVIRT_LXC_NOSECLABEL
Deprecated in2.12Deprecated detailenvironment variables withoutANSIBLE_
prefix are deprecatedDeprecated alternativestheANSIBLE_LIBVIRT_LXC_NOSECLABEL
environment variable
DEFAULT_LOAD_CALLBACK_PLUGINS
Description
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
.Type
booleanDefault
False
Version Added
1.8IniSection
[defaults]Key
bin_ansible_callbacksEnvironmentVariable
DEFAULT_LOCAL_TMP
Description
Temporary directory for Ansible to use on the controller.Type
tmppathDefault
~/.ansible/tmp
IniSection
[defaults]Key
local_tmpEnvironmentVariable
DEFAULT_LOG_FILTER
Description
List of logger names to filter out of the log fileType
listDefault
[]
IniSection
[defaults]Key
log_filterEnvironmentVariable
DEFAULT_LOG_PATH
Description
File to which Ansible will log on the controller. When empty logging is disabled.Type
pathDefault
None
IniSection
[defaults]Key
log_pathEnvironmentVariable
DEFAULT_LOOKUP_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Lookup Plugins.Type
pathspecDefault
~/.ansible/plugins/lookup:/usr/share/ansible/plugins/lookup
IniSection
[defaults]Key
lookup_pluginsEnvironmentVariable
DEFAULT_MANAGED_STR
Description
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.Default
Ansible managed
IniSection
[defaults]Key
ansible_managed
DEFAULT_MODULE_ARGS
Description
This sets the default arguments to pass to the ansible
adhoc binary if no -a
is specified.Default
None
IniSection
[defaults]Key
module_argsEnvironmentVariable
DEFAULT_MODULE_COMPRESSION
Description
Compression scheme to use when transferring Python modules to the target.Default
ZIP_DEFLATED
IniSection
[defaults]Key
module_compression
DEFAULT_MODULE_NAME
Description
Module to use with the ansible
AdHoc command, if none is specified via -m
.Default
command
IniSection
[defaults]Key
module_name
DEFAULT_MODULE_PATH
Description
Colon separated paths in which Ansible will search for Modules.Type
pathspecDefault
~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
IniSection
[defaults]Key
libraryEnvironmentVariable
DEFAULT_MODULE_UTILS_PATH
Description
Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.Type
pathspecDefault
~/.ansible/plugins/module_utils:/usr/share/ansible/plugins/module_utils
IniSection
[defaults]Key
module_utilsEnvironmentVariable
DEFAULT_NETCONF_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Netconf Plugins.Type
pathspecDefault
~/.ansible/plugins/netconf:/usr/share/ansible/plugins/netconf
IniSection
[defaults]Key
netconf_pluginsEnvironmentVariable
DEFAULT_NO_LOG
Description
Toggle Ansible’s display and logging of task details, mainly used to avoid security disclosures.Type
booleanDefault
False
IniSection
[defaults]Key
no_logEnvironmentVariable
DEFAULT_NO_TARGET_SYSLOG
Description
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.Type
booleanDefault
False
IniSection
[defaults]Key
no_target_syslogEnvironmentVariable
ANSIBLE_NO_TARGET_SYSLOG
Variablesname
ansible_no_target_syslog :Version Added: 2.10
DEFAULT_NULL_REPRESENTATION
Description
What templating should return as a ‘null’ value. When not set it will let Jinja2 decide.Type
noneDefault
None
IniSection
[defaults]Key
null_representationEnvironmentVariable
DEFAULT_POLL_INTERVAL
Description
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.Type
integerDefault
15
IniSection
[defaults]Key
poll_intervalEnvironmentVariable
DEFAULT_PRIVATE_KEY_FILE
Description
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.Type
pathDefault
None
IniSection
[defaults]Key
private_key_fileEnvironmentVariable
DEFAULT_PRIVATE_ROLE_VARS
Description
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.Type
booleanDefault
False
IniSection
[defaults]Key
private_role_varsEnvironmentVariable
DEFAULT_REMOTE_PORT
Description
Port to use in remote connections, when blank it will use the connection plugin default.Type
integerDefault
None
IniSection
[defaults]Key
remote_portEnvironmentVariable
DEFAULT_REMOTE_USER
Description
Sets the login user for the target machines When blank it uses the connection plugin’s default, normally the user currently executing Ansible.IniSection
[defaults]Key
remote_userEnvironmentVariable
DEFAULT_ROLES_PATH
Description
Colon separated paths in which Ansible will search for Roles.Type
pathspecDefault
~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
IniSection
[defaults]Key
roles_pathEnvironmentVariable
DEFAULT_SELINUX_SPECIAL_FS
Description
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.Type
listDefault
fuse, nfs, vboxsf, ramfs, 9p, vfat
IniSection
[selinux]Key
special_context_filesystemsEnvironmentVariable
ANSIBLE_SELINUX_SPECIAL_FS
:Version Added: 2.9
DEFAULT_STDOUT_CALLBACK
Description
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
default
IniSection
[defaults]Key
stdout_callbackEnvironmentVariable
DEFAULT_STRATEGY
Description
Set the default strategy used for plays.Default
linear
Version Added
2.3IniSection
[defaults]Key
strategyEnvironmentVariable
DEFAULT_STRATEGY_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Strategy Plugins.Type
pathspecDefault
~/.ansible/plugins/strategy:/usr/share/ansible/plugins/strategy
IniSection
[defaults]Key
strategy_pluginsEnvironmentVariable
DEFAULT_SU
Description
Toggle the use of “su” for tasks.Type
booleanDefault
False
IniSection
[defaults]Key
suEnvironmentVariable
DEFAULT_SYSLOG_FACILITY
Description
Syslog facility to use when Ansible logs to the remote targetDefault
LOG_USER
IniSection
[defaults]Key
syslog_facilityEnvironmentVariable
DEFAULT_TERMINAL_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Terminal Plugins.Type
pathspecDefault
~/.ansible/plugins/terminal:/usr/share/ansible/plugins/terminal
IniSection
[defaults]Key
terminal_pluginsEnvironmentVariable
DEFAULT_TEST_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Jinja2 Test Plugins.Type
pathspecDefault
~/.ansible/plugins/test:/usr/share/ansible/plugins/test
IniSection
[defaults]Key
test_pluginsEnvironmentVariable
DEFAULT_TIMEOUT
Description
This is the default timeout for connection plugins to use.Type
integerDefault
10
IniSection
[defaults]Key
timeoutEnvironmentVariable
DEFAULT_TRANSPORT
Description
Default connection plugin to use, the ‘smart’ option will toggle between ‘ssh’ and ‘paramiko’ depending on controller OS and ssh versionsDefault
smart
IniSection
[defaults]Key
transportEnvironmentVariable
DEFAULT_UNDEFINED_VAR_BEHAVIOR
Description
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.Type
booleanDefault
True
Version Added
1.3IniSection
[defaults]Key
error_on_undefined_varsEnvironmentVariable
ANSIBLE_ERROR_ON_UNDEFINED_VARS
DEFAULT_VARS_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Vars Plugins.Type
pathspecDefault
~/.ansible/plugins/vars:/usr/share/ansible/plugins/vars
IniSection
[defaults]Key
vars_pluginsEnvironmentVariable
DEFAULT_VAULT_ENCRYPT_IDENTITY
Description
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.IniSection
[defaults]Key
vault_encrypt_identityEnvironmentVariable
ANSIBLE_VAULT_ENCRYPT_IDENTITY
DEFAULT_VAULT_ID_MATCH
Description
If true, decrypting vaults with a vault id will only try the password from the matching vault-idDefault
False
IniSection
[defaults]Key
vault_id_matchEnvironmentVariable
DEFAULT_VAULT_IDENTITY
Description
The label to use for the default vault id label in cases where a vault id label is not providedDefault
default
IniSection
[defaults]Key
vault_identityEnvironmentVariable
DEFAULT_VAULT_IDENTITY_LIST
Description
A list of vault-ids to use by default. Equivalent to multiple –vault-id args. Vault-ids are tried in order.Type
listDefault
[]
IniSection
[defaults]Key
vault_identity_listEnvironmentVariable
DEFAULT_VAULT_PASSWORD_FILE
Description
The vault password file to use. Equivalent to –vault-password-file or –vault-id If executable, it will be run and the resulting stdout will be used as the password.Type
pathDefault
None
IniSection
[defaults]Key
vault_password_fileEnvironmentVariable
DEFAULT_VERBOSITY
Description
Sets the default verbosity, equivalent to the number of -v
passed in the command line.Type
integerDefault
0
IniSection
[defaults]Key
verbosityEnvironmentVariable
DEPRECATION_WARNINGS
Description
Toggle to control the showing of deprecation warningsType
booleanDefault
True
IniSection
[defaults]Key
deprecation_warningsEnvironmentVariable
DEVEL_WARNING
Description
Toggle to control showing warnings related to running develType
booleanDefault
True
IniSection
[defaults]Key
devel_warningEnvironmentVariable
DIFF_ALWAYS
Description
Configuration toggle to tell modules to show differences when in ‘changed’ status, equivalent to --diff
.Type
boolDefault
False
IniSection
[diff]Key
alwaysEnvironmentVariable
DIFF_CONTEXT
Description
How many lines of context to show when displaying the differences between files.Type
integerDefault
3
IniSection
[diff]Key
contextEnvironmentVariable
DISPLAY_ARGS_TO_STDOUT
Description
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.Type
booleanDefault
False
Version Added
2.1IniSection
[defaults]Key
display_args_to_stdoutEnvironmentVariable
ANSIBLE_DISPLAY_ARGS_TO_STDOUT
DISPLAY_SKIPPED_HOSTS
Description
Toggle to control displaying skipped task/host entries in a task in the default callbackType
booleanDefault
True
IniSection
[defaults]Key
display_skipped_hostsEnvironment
- Variable
ANSIBLE_DISPLAY_SKIPPED_HOSTS
- Variable
DISPLAY_SKIPPED_HOSTS
Deprecated in2.12Deprecated detailenvironment variables withoutANSIBLE_
prefix are deprecatedDeprecated alternativestheANSIBLE_DISPLAY_SKIPPED_HOSTS
environment variable
DOC_FRAGMENT_PLUGIN_PATH
Description
Colon separated paths in which Ansible will search for Documentation Fragments Plugins.Type
pathspecDefault
~/.ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments
IniSection
[defaults]Key
doc_fragment_pluginsEnvironmentVariable
DOCSITE_ROOT_URL
Description
Root docsite URL used to generate docs URLs in warning/error text; must be an absolute URL with valid scheme and trailing slash.Default
https://docs.ansible.com/ansible-core/
Version Added
2.8IniSection
[defaults]Key
docsite_root_url
DUPLICATE_YAML_DICT_KEY
Description
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.Type
stringDefault
warn
Choices
- warn
- error
- ignore
Version Added
2.9IniSection
[defaults]Key
duplicate_dict_keyEnvironmentVariable
ANSIBLE_DUPLICATE_YAML_DICT_KEY
ENABLE_TASK_DEBUGGER
Description
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.Type
booleanDefault
False
Version Added
2.5IniSection
[defaults]Key
enable_task_debuggerEnvironmentVariable
ERROR_ON_MISSING_HANDLER
Description
Toggle to allow missing handlers to become a warning instead of an error when notifying.Type
booleanDefault
True
IniSection
[defaults]Key
error_on_missing_handlerEnvironmentVariable
ANSIBLE_ERROR_ON_MISSING_HANDLER
FACTS_MODULES
Description
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.Type
listDefault
['smart']
IniSection
[defaults]Key
facts_modulesEnvironmentVariable
ANSIBLE_FACTS_MODULES
Variablesname
ansible_facts_modules
GALAXY_CACHE_DIR
Description
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.Type
pathDefault
~/.ansible/galaxy_cache
Version Added
2.11IniSection
[galaxy]Key
cache_dirEnvironmentVariable
GALAXY_DISPLAY_PROGRESS
Description
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.Type
boolDefault
None
Version Added
2.10IniSection
[galaxy]Key
display_progressEnvironmentVariable
ANSIBLE_GALAXY_DISPLAY_PROGRESS
GALAXY_IGNORE_CERTS
Description
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.Type
booleanDefault
False
IniSection
[galaxy]Key
ignore_certsEnvironmentVariable
GALAXY_ROLE_SKELETON
Description
Role or collection skeleton directory to use as a template for the init
action in ansible-galaxy
, same as --role-skeleton
.Type
pathIniSection
[galaxy]Key
role_skeletonEnvironmentVariable
GALAXY_ROLE_SKELETON_IGNORE
Description
patterns of files to ignore inside a Galaxy role or collection skeleton directoryType
listDefault
['^.git$', '^.*/.git_keep$']
IniSection
[galaxy]Key
role_skeleton_ignoreEnvironmentVariable
ANSIBLE_GALAXY_ROLE_SKELETON_IGNORE
GALAXY_SERVER
Description
URL to prepend when roles don’t specify the full URI, assume they are referencing this server as the source.Default
[galaxy]Key
serverEnvironmentVariable
GALAXY_SERVER_LIST
Description
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.Type
listVersion Added
2.9IniSection
[galaxy]Key
server_listEnvironmentVariable
GALAXY_TOKEN_PATH
Description
Local path to galaxy access token fileType
pathDefault
~/.ansible/galaxy_token
Version Added
2.9IniSection
[galaxy]Key
token_pathEnvironmentVariable
HOST_KEY_CHECKING
Description
Set this to “False” if you want to avoid host key checking by the underlying tools Ansible uses to connect to the hostType
booleanDefault
True
IniSection
[defaults]Key
host_key_checkingEnvironmentVariable
HOST_PATTERN_MISMATCH
Description
This setting changes the behaviour of mismatched host patterns, it allows you to force a fatal error, a warning or just ignore itDefault
warning
Choices
- warning
- error
- ignore
Version Added
2.8IniSection
[inventory]Key
host_pattern_mismatchEnvironmentVariable
INJECT_FACTS_AS_VARS
Description
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.Type
booleanDefault
True
Version Added
2.5IniSection
[defaults]Key
inject_facts_as_varsEnvironmentVariable
INTERPRETER_PYTHON
Description
Path to the Python interpreter to be used for module execution on remote targets, or an automatic discovery mode. Supported discovery modes are auto
(the default), auto_silent
, auto_legacy
, and auto_legacy_silent
. 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
or auto_legacy_silent
. The 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.Default
auto
Version Added
2.8IniSection
[defaults]Key
interpreter_pythonEnvironmentVariable
ANSIBLE_PYTHON_INTERPRETER
Variablesname
ansible_python_interpreter
INTERPRETER_PYTHON_DISTRO_MAP
Default
{'centos': {'6': '/usr/bin/python', '8': '/usr/libexec/platform-python', '9': '/usr/bin/python3'}, 'debian': {'8': '/usr/bin/python', '10': '/usr/bin/python3'}, 'fedora': {'23': '/usr/bin/python3'}, 'oracle': {'6': '/usr/bin/python', '8': '/usr/libexec/platform-python', '9': '/usr/bin/python3'}, 'redhat': {'6': '/usr/bin/python', '8': '/usr/libexec/platform-python', '9': '/usr/bin/python3'}, 'rhel': {'6': '/usr/bin/python', '8': '/usr/libexec/platform-python', '9': '/usr/bin/python3'}, 'ubuntu': {'14': '/usr/bin/python', '16': '/usr/bin/python3'}}
Version Added
2.8
INTERPRETER_PYTHON_FALLBACK
Type
listDefault
['python3.10', 'python3.9', 'python3.8', 'python3.7', 'python3.6', 'python3.5', '/usr/bin/python3', '/usr/libexec/platform-python', 'python2.7', 'python2.6', '/usr/bin/python', 'python']
Version Added
2.8Variablesname
ansible_interpreter_python_fallback
INVALID_TASK_ATTRIBUTE_FAILED
Description
If ‘false’, invalid attributes for a task will result in warnings instead of errorsType
booleanDefault
True
Version Added
2.7IniSection
[defaults]Key
invalid_task_attribute_failedEnvironmentVariable
ANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED
INVENTORY_ANY_UNPARSED_IS_FAILED
Description
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.Type
booleanDefault
False
Version Added
2.7IniSection
[inventory]Key
any_unparsed_is_failedEnvironmentVariable
ANSIBLE_INVENTORY_ANY_UNPARSED_IS_FAILED
INVENTORY_CACHE_ENABLED
Description
Toggle to turn on inventory caching. This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins. The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory configuration. This message will be removed in 2.16.Type
boolDefault
False
IniSection
[inventory]Key
cacheEnvironmentVariable
INVENTORY_CACHE_PLUGIN
Description
The plugin for caching inventory. This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins. The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. This message will be removed in 2.16.IniSection
[inventory]Key
cache_pluginEnvironmentVariable
ANSIBLE_INVENTORY_CACHE_PLUGIN
INVENTORY_CACHE_PLUGIN_CONNECTION
Description
The inventory cache connection. This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins. The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. This message will be removed in 2.16.IniSection
[inventory]Key
cache_connectionEnvironmentVariable
ANSIBLE_INVENTORY_CACHE_CONNECTION
INVENTORY_CACHE_PLUGIN_PREFIX
Description
The table prefix for the cache plugin. This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins. The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. This message will be removed in 2.16.Default
ansible_inventory_
IniSection
[inventory]Key
cache_prefixEnvironmentVariable
ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
INVENTORY_CACHE_TIMEOUT
Description
Expiration timeout for the inventory cache plugin data. This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins. The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration. This message will be removed in 2.16.Default
3600
IniSection
[inventory]Key
cache_timeoutEnvironmentVariable
ANSIBLE_INVENTORY_CACHE_TIMEOUT
INVENTORY_ENABLED
Description
List of enabled inventory plugins, it also determines the order in which they are used.Type
listDefault
['host_list', 'script', 'auto', 'yaml', 'ini', 'toml']
IniSection
[inventory]Key
enable_pluginsEnvironmentVariable
INVENTORY_EXPORT
Description
Controls if ansible-inventory will accurately reflect Ansible’s view into inventory or its optimized for exporting.Type
boolDefault
False
IniSection
[inventory]Key
exportEnvironmentVariable
INVENTORY_IGNORE_EXTS
Description
List of extensions to ignore when using a directory as an inventory sourceType
listDefault
{{(REJECT_EXTS + ('.orig', '.ini', '.cfg', '.retry'))}}
Ini
- Section[defaults]Keyinventory_ignore_extensions
- Section[inventory]Keyignore_extensions
EnvironmentVariable
INVENTORY_IGNORE_PATTERNS
Description
List of patterns to ignore when using a directory as an inventory sourceType
listDefault
[]
Ini
- Section[defaults]Keyinventory_ignore_patterns
- Section[inventory]Keyignore_patterns
EnvironmentVariable
ANSIBLE_INVENTORY_IGNORE_REGEX
INVENTORY_UNPARSED_IS_FAILED
Description
If ‘true’ it is a fatal error if every single potential inventory source fails to parse, otherwise this situation will only attract a warning.Type
boolDefault
False
IniSection
[inventory]Key
unparsed_is_failedEnvironmentVariable
ANSIBLE_INVENTORY_UNPARSED_FAILED
JINJA2_NATIVE_WARNING
Description
Toggle to control showing warnings related to running a Jinja version older than required for jinja2_nativeType
booleanDefault
True
IniSection
[defaults]Key
jinja2_native_warningEnvironmentVariable
LOCALHOST_WARNING
Description
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.Type
booleanDefault
True
Version Added
2.6IniSection
[defaults]Key
localhost_warningEnvironmentVariable
MAX_FILE_SIZE_FOR_DIFF
Description
Maximum size of files to be considered for diff displayType
intDefault
104448
IniSection
[defaults]Key
max_diff_sizeEnvironmentVariable
MODULE_IGNORE_EXTS
Description
List of extensions to ignore when looking for modules to load This is for rejecting script and binary module fallback extensionsType
listDefault
{{(REJECT_EXTS + ('.yaml', '.yml', '.ini'))}}
IniSection
[defaults]Key
module_ignore_extsEnvironmentVariable
NETCONF_SSH_CONFIG
Description
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.Default
None
IniSection
[netconf_connection]Key
ssh_configEnvironmentVariable
NETWORK_GROUP_MODULES
Type
listDefault
['eos', 'nxos', 'ios', 'iosxr', 'junos', 'enos', 'ce', 'vyos', 'sros', 'dellos9', 'dellos10', 'dellos6', 'asa', 'aruba', 'aireos', 'bigip', 'ironware', 'onyx', 'netconf', 'exos', 'voss', 'slxos']
IniSection
[defaults]Key
network_group_modulesEnvironment
- Variable
ANSIBLE_NETWORK_GROUP_MODULES
- Variable
NETWORK_GROUP_MODULES
Deprecated in2.12Deprecated detailenvironment variables withoutANSIBLE_
prefix are deprecatedDeprecated alternativestheANSIBLE_NETWORK_GROUP_MODULES
environment variable
OLD_PLUGIN_CACHE_CLEARING
Description
Previously 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.Type
booleanDefault
False
Version Added
2.8IniSection
[defaults]Key
old_plugin_cache_clearEnvironmentVariable
ANSIBLE_OLD_PLUGIN_CACHE_CLEAR
PARAMIKO_HOST_KEY_AUTO_ADD
Type
booleanDefault
False
IniSection
[paramiko_connection]Key
host_key_auto_addEnvironmentVariable
ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
PARAMIKO_LOOK_FOR_KEYS
Type
booleanDefault
True
IniSection
[paramiko_connection]Key
look_for_keysEnvironmentVariable
ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
PERSISTENT_COMMAND_TIMEOUT
Description
This controls the amount of time to wait for response from remote device before timing out persistent connection.Type
intDefault
30
IniSection
[persistent_connection]Key
command_timeoutEnvironmentVariable
ANSIBLE_PERSISTENT_COMMAND_TIMEOUT
PERSISTENT_CONNECT_RETRY_TIMEOUT
Description
This controls the retry timeout for persistent connection to connect to the local domain socket.Type
integerDefault
15
IniSection
[persistent_connection]Key
connect_retry_timeoutEnvironmentVariable
ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT
PERSISTENT_CONNECT_TIMEOUT
Description
This controls how long the persistent connection will remain idle before it is destroyed.Type
integerDefault
30
IniSection
[persistent_connection]Key
connect_timeoutEnvironmentVariable
ANSIBLE_PERSISTENT_CONNECT_TIMEOUT
PERSISTENT_CONTROL_PATH_DIR
Description
Path to socket to be used by the connection persistence system.Type
pathDefault
~/.ansible/pc
IniSection
[persistent_connection]Key
control_path_dirEnvironmentVariable
ANSIBLE_PERSISTENT_CONTROL_PATH_DIR
PLAYBOOK_DIR
Description
A number of non-playbook CLIs have a --playbook-dir
argument; this sets the default value for it.Type
pathVersion Added
2.9IniSection
[defaults]Key
playbook_dirEnvironmentVariable
PLAYBOOK_VARS_ROOT
Description
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.Default
top
Choices
- top
- bottom
- all
Version Added
2.4.1IniSection
[defaults]Key
playbook_vars_rootEnvironmentVariable
PLUGIN_FILTERS_CFG
Description
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.ymlType
pathDefault
None
Version Added
2.5.0Ini
- Section[default]Keyplugin_filters_cfgDeprecated in2.12Deprecated detailspecifying “plugin_filters_cfg” under the “default” section is deprecatedDeprecated alternativesthe “defaults” section instead
- Section[defaults]Keyplugin_filters_cfg
PYTHON_MODULE_RLIMIT_NOFILE
Description
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.Default
0
Version Added
2.8IniSection
[defaults]Key
python_module_rlimit_nofileEnvironmentVariable
ANSIBLE_PYTHON_MODULE_RLIMIT_NOFILE
Variablesname
ansible_python_module_rlimit_nofile
RETRY_FILES_ENABLED
Description
This controls whether a failed Ansible playbook should create a .retry file.Type
boolDefault
False
IniSection
[defaults]Key
retry_files_enabledEnvironmentVariable
RETRY_FILES_SAVE_PATH
Description
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.Type
pathDefault
None
IniSection
[defaults]Key
retry_files_save_pathEnvironmentVariable
RUN_VARS_PLUGINS
Description
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.Type
strDefault
demand
Choices
- demand
- start
Version Added
2.10IniSection
[defaults]Key
run_vars_pluginsEnvironmentVariable
SHOW_CUSTOM_STATS
Description
This adds the custom stats set via the set_stats plugin to the default outputType
boolDefault
False
IniSection
[defaults]Key
show_custom_statsEnvironmentVariable
STRING_CONVERSION_ACTION
Description
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.Type
stringDefault
warn
Version Added
2.8IniSection
[defaults]Key
string_conversion_actionEnvironmentVariable
ANSIBLE_STRING_CONVERSION_ACTION
STRING_TYPE_FILTERS
Description
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.Type
listDefault
['string', 'to_json', 'to_nice_json', 'to_yaml', 'to_nice_yaml', 'ppretty', 'json']
IniSection
[jinja2]Key
dont_type_filtersEnvironmentVariable
SYSTEM_WARNINGS
Description
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.Type
booleanDefault
True
IniSection
[defaults]Key
system_warningsEnvironmentVariable
TAGS_RUN
Description
default list of tags to run in your plays, Skip Tags has precedence.Type
listDefault
[]
Version Added
2.5IniSection
[tags]Key
runEnvironmentVariable
TAGS_SKIP
Description
default list of tags to skip in your plays, has precedence over Run TagsType
listDefault
[]
Version Added
2.5IniSection
[tags]Key
skipEnvironmentVariable
TASK_DEBUGGER_IGNORE_ERRORS
Description
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.Type
booleanDefault
True
Version Added
2.7IniSection
[defaults]Key
task_debugger_ignore_errorsEnvironmentVariable
ANSIBLE_TASK_DEBUGGER_IGNORE_ERRORS
TASK_TIMEOUT
Description
Set the maximum time (in seconds) that a task can run for. If set to 0 (the default) there is no timeout.Type
integerDefault
0
Version Added
2.10IniSection
[defaults]Key
task_timeoutEnvironmentVariable
TRANSFORM_INVALID_GROUP_CHARS
Description
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.Type
stringDefault
never
Choices
- always
- never
- ignore
- silently
Version Added
2.8IniSection
[defaults]Key
force_valid_group_namesEnvironmentVariable
ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS
USE_PERSISTENT_CONNECTIONS
Description
Toggles the use of persistence for connections.Type
booleanDefault
False
IniSection
[defaults]Key
use_persistent_connectionsEnvironmentVariable
ANSIBLE_USE_PERSISTENT_CONNECTIONS
VALIDATE_ACTION_GROUP_METADATA
Description
A toggle to disable validating a collection’s ‘metadata’ entry for a module_defaults action group. Metadata containing unexpected fields or value types will produce a warning when this is True.Type
boolDefault
True
Version Added
2.12IniSection
[defaults]Key
validate_action_group_metadataEnvironmentVariable
ANSIBLE_VALIDATE_ACTION_GROUP_METADATA
VARIABLE_PLUGINS_ENABLED
Description
Whitelist for variable plugins that require it.Type
listDefault
['host_group_vars']
Version Added
2.10IniSection
[defaults]Key
vars_plugins_enabledEnvironmentVariable
VARIABLE_PRECEDENCE
Description
Allows to change the group variable precedence merge order.Type
listDefault
['all_inventory', 'groups_inventory', 'all_plugins_inventory', 'all_plugins_play', 'groups_plugins_inventory', 'groups_plugins_play']
Version Added
2.4IniSection
[defaults]Key
precedenceEnvironmentVariable
VERBOSE_TO_STDERR
Description
Force ‘verbose’ option to use stderr instead of stdoutType
boolDefault
False
Version Added
2.8IniSection
[defaults]Key
verbose_to_stderrEnvironmentVariable
WIN_ASYNC_STARTUP_TIMEOUT
Description
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.Type
integerDefault
5
Version Added
2.10IniSection
[defaults]Key
win_async_startup_timeoutEnvironmentVariable
ANSIBLE_WIN_ASYNC_STARTUP_TIMEOUT
Variablesname
ansible_win_async_startup_timeout
WORKER_SHUTDOWN_POLL_COUNT
Description
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.Type
integerDefault
0
Version Added
2.10EnvironmentVariable
ANSIBLE_WORKER_SHUTDOWN_POLL_COUNT
WORKER_SHUTDOWN_POLL_DELAY
Description
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.Type
floatDefault
0.1
Version Added
2.10EnvironmentVariable
ANSIBLE_WORKER_SHUTDOWN_POLL_DELAY
YAML_FILENAME_EXTENSIONS
Description
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.Type
listDefault
['.yml', '.yaml', '.json']
IniSection
[defaults]Key
yaml_valid_extensionsEnvironmentVariable
Environment Variables
ANSIBLE_CONFIG
Override the default ansible config fileANSIBLE_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_PATHANSIBLE_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_SELECTIONANSIBLE_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_ACCEPTLISTDeprecated in
2.15Deprecated detail
normalizing names to new standardDeprecated alternatives
ANSIBLE_COW_ACCEPTLISTANSIBLE_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_ACCEPTLISTVersion Added
2.11ANSIBLE_FORCE_COLOR
This option forces color mode even when running without a TTY or the “nocolor” setting is True.
See also ANSIBLE_FORCE_COLORANSIBLE_NOCOLOR
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.
See also ANSIBLE_NOCOLORNO_COLOR
This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.
See also ANSIBLE_NOCOLORVersion Added
2.11ANSIBLE_NOCOWS
If you have cowsay installed but want to avoid the ‘cows’ (why????), use this.
See also ANSIBLE_NOCOWSANSIBLE_COW_PATH
Specify a custom cowsay path or swap in your cowsay implementation of choice
See also ANSIBLE_COW_PATHANSIBLE_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_PIPELININGANSIBLE_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_FATALANSIBLE_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.If executable, it will be run and the resulting stdout will be used as the password.
See also BECOME_ALLOW_SAME_USERANSIBLE_BECOME_PASSWORD_FILE
The password file to use for the become plugin. –become-password-file.If executable, it will be run and the resulting stdout will be used as the password.
See also BECOME_PASSWORD_FILEANSIBLE_AGNOSTIC_BECOME_PROMPT
Display an agnostic become prompt instead of displaying a prompt containing the command line supplied become method
See also AGNOSTIC_BECOME_PROMPTANSIBLE_CACHE_PLUGIN
Chooses which cache plugin to use, the default ‘memory’ is ephemeral.
See also CACHE_PLUGINANSIBLE_CACHE_PLUGIN_CONNECTION
Defines connection or path information for the cache plugin
See also CACHE_PLUGIN_CONNECTIONANSIBLE_CACHE_PLUGIN_PREFIX
Prefix to use for cache plugin files/tables
See also CACHE_PLUGIN_PREFIXANSIBLE_CACHE_PLUGIN_TIMEOUT
Expiration timeout for the cache plugin data
See also CACHE_PLUGIN_TIMEOUTANSIBLE_COLLECTIONS_SCAN_SYS_PATH
A boolean to enable or disable scanning the sys.path for installed collections
See also COLLECTIONS_SCAN_SYS_PATHANSIBLE_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_PATHSANSIBLE_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_PATHSVersion Added
2.10ANSIBLE_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.
See also COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCHANSIBLE_COLOR_CHANGED
Defines the color to use on ‘Changed’ task status
See also COLOR_CHANGEDANSIBLE_COLOR_CONSOLE_PROMPT
Defines the default color to use for ansible-console
See also COLOR_CONSOLE_PROMPTANSIBLE_COLOR_DEBUG
Defines the color to use when emitting debug messages
See also COLOR_DEBUGANSIBLE_COLOR_DEPRECATE
Defines the color to use when emitting deprecation messages
See also COLOR_DEPRECATEANSIBLE_COLOR_DIFF_ADD
Defines the color to use when showing added lines in diffs
See also COLOR_DIFF_ADDANSIBLE_COLOR_DIFF_LINES
Defines the color to use when showing diffs
See also COLOR_DIFF_LINESANSIBLE_COLOR_DIFF_REMOVE
Defines the color to use when showing removed lines in diffs
See also COLOR_DIFF_REMOVEANSIBLE_COLOR_ERROR
Defines the color to use when emitting error messages
See also COLOR_ERRORANSIBLE_COLOR_HIGHLIGHT
Defines the color to use for highlighting
See also COLOR_HIGHLIGHTANSIBLE_COLOR_OK
Defines the color to use when showing ‘OK’ task status
See also COLOR_OKANSIBLE_COLOR_SKIP
Defines the color to use when showing ‘Skipped’ task status
See also COLOR_SKIPANSIBLE_COLOR_UNREACHABLE
Defines the color to use on ‘Unreachable’ status
See also COLOR_UNREACHABLEANSIBLE_COLOR_VERBOSE
Defines the color to use when emitting verbose messages. i.e those that show with ‘-v’s.
See also COLOR_VERBOSEANSIBLE_COLOR_WARN
Defines the color to use when emitting warning messages
See also COLOR_WARNANSIBLE_CONNECTION_PASSWORD_FILE
The password file to use for the connection plugin. –connection-password-file.
See also CONNECTION_PASSWORD_FILE_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_PATHSANSIBLE_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_WARNINGSANSIBLE_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_WARNINGSANSIBLE_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_WARNINGANSIBLE_DOC_FRAGMENT_PLUGINS
Colon separated paths in which Ansible will search for Documentation Fragments Plugins.
See also DOC_FRAGMENT_PLUGIN_PATHANSIBLE_ACTION_PLUGINS
Colon separated paths in which Ansible will search for Action Plugins.
See also DEFAULT_ACTION_PLUGIN_PATHANSIBLE_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_PASSANSIBLE_ASK_VAULT_PASS
This controls whether an Ansible playbook should prompt for a vault password.
See also DEFAULT_ASK_VAULT_PASSANSIBLE_BECOME
Toggles the use of privilege escalation, allowing you to ‘become’ another user after login.
See also DEFAULT_BECOMEANSIBLE_BECOME_ASK_PASS
Toggle to prompt for privilege escalation password.
See also DEFAULT_BECOME_ASK_PASSANSIBLE_BECOME_METHOD
Privilege escalation method to use when become is enabled.
See also DEFAULT_BECOME_METHODANSIBLE_BECOME_EXE
executable to use for privilege escalation, otherwise Ansible will depend on PATH
See also DEFAULT_BECOME_EXEANSIBLE_BECOME_FLAGS
Flags to pass to the privilege escalation executable.
See also DEFAULT_BECOME_FLAGSANSIBLE_BECOME_PLUGINS
Colon separated paths in which Ansible will search for Become Plugins.
See also BECOME_PLUGIN_PATHANSIBLE_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_USERANSIBLE_CACHE_PLUGINS
Colon separated paths in which Ansible will search for Cache Plugins.
See also DEFAULT_CACHE_PLUGIN_PATHANSIBLE_CALLABLE_WHITELIST
Whitelist of callable methods to be made available to template evaluation
See also CALLABLE_ACCEPT_LISTDeprecated in
2.15Deprecated detail
normalizing names to new standardDeprecated alternatives
ANSIBLE_CALLABLE_ENABLEDANSIBLE_CALLABLE_ENABLED
Whitelist of callable methods to be made available to template evaluation
See also CALLABLE_ACCEPT_LISTVersion Added
2.11ANSIBLE_CALLBACK_PLUGINS
Colon separated paths in which Ansible will search for Callback Plugins.
See also DEFAULT_CALLBACK_PLUGIN_PATHANSIBLE_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_ENABLEDDeprecated in
2.15Deprecated detail
normalizing names to new standardDeprecated alternatives
ANSIBLE_CALLBACKS_ENABLEDANSIBLE_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_ENABLEDVersion Added
2.11ANSIBLE_CLICONF_PLUGINS
Colon separated paths in which Ansible will search for Cliconf Plugins.
See also DEFAULT_CLICONF_PLUGIN_PATHANSIBLE_CONNECTION_PLUGINS
Colon separated paths in which Ansible will search for Connection Plugins.
See also DEFAULT_CONNECTION_PLUGIN_PATHANSIBLE_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_DEBUGANSIBLE_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_EXECUTABLEANSIBLE_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_PATHANSIBLE_FILTER_PLUGINS
Colon separated paths in which Ansible will search for Jinja2 Filter Plugins.
See also DEFAULT_FILTER_PLUGIN_PATHANSIBLE_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_HANDLERSANSIBLE_FORKS
Maximum number of forks Ansible will use to execute tasks on target hosts.
See also DEFAULT_FORKSANSIBLE_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_GATHERINGANSIBLE_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_SUBSETANSIBLE_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_TIMEOUTANSIBLE_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_BEHAVIOURANSIBLE_INVENTORY
Comma separated list of Ansible inventory sources
See also DEFAULT_HOST_LISTANSIBLE_HTTPAPI_PLUGINS
Colon separated paths in which Ansible will search for HttpApi Plugins.
See also DEFAULT_HTTPAPI_PLUGIN_PATHANSIBLE_INVENTORY_PLUGINS
Colon separated paths in which Ansible will search for Inventory Plugins.
See also DEFAULT_INVENTORY_PLUGIN_PATHANSIBLE_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_EXTENSIONSANSIBLE_JINJA2_NATIVE
This option preserves variable types during template operations. This requires Jinja2 >= 2.10.
See also DEFAULT_JINJA2_NATIVEANSIBLE_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_FILESLIBVIRT_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_NOSECLABELDeprecated in
2.12Deprecated detail
environment variables without ANSIBLE_
prefix are deprecatedDeprecated alternatives
the ANSIBLE_LIBVIRT_LXC_NOSECLABEL
environment variableANSIBLE_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_NOSECLABELANSIBLE_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_PLUGINSANSIBLE_LOCAL_TEMP
Temporary directory for Ansible to use on the controller.
See also DEFAULT_LOCAL_TMPANSIBLE_LOG_PATH
File to which Ansible will log on the controller. When empty logging is disabled.
See also DEFAULT_LOG_PATHANSIBLE_LOG_FILTER
List of logger names to filter out of the log file
See also DEFAULT_LOG_FILTERANSIBLE_LOOKUP_PLUGINS
Colon separated paths in which Ansible will search for Lookup Plugins.
See also DEFAULT_LOOKUP_PLUGIN_PATHANSIBLE_MODULE_ARGS
This sets the default arguments to pass to the ansible
adhoc binary if no -a
is specified.
See also DEFAULT_MODULE_ARGSANSIBLE_LIBRARY
Colon separated paths in which Ansible will search for Modules.
See also DEFAULT_MODULE_PATHANSIBLE_MODULE_UTILS
Colon separated paths in which Ansible will search for Module utils files, which are shared by modules.
See also DEFAULT_MODULE_UTILS_PATHANSIBLE_NETCONF_PLUGINS
Colon separated paths in which Ansible will search for Netconf Plugins.
See also DEFAULT_NETCONF_PLUGIN_PATHANSIBLE_NO_LOG
Toggle Ansible’s display and logging of task details, mainly used to avoid security disclosures.
See also DEFAULT_NO_LOGANSIBLE_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_SYSLOGANSIBLE_NULL_REPRESENTATION
What templating should return as a ‘null’ value. When not set it will let Jinja2 decide.
See also DEFAULT_NULL_REPRESENTATIONANSIBLE_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_INTERVALANSIBLE_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_FILEANSIBLE_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_VARSANSIBLE_REMOTE_PORT
Port to use in remote connections, when blank it will use the connection plugin default.
See also DEFAULT_REMOTE_PORTANSIBLE_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_USERANSIBLE_ROLES_PATH
Colon separated paths in which Ansible will search for Roles.
See also DEFAULT_ROLES_PATHANSIBLE_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_FSVersion Added
2.9ANSIBLE_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_CALLBACKANSIBLE_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_DEBUGGERANSIBLE_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_ERRORSANSIBLE_STRATEGY
Set the default strategy used for plays.
See also DEFAULT_STRATEGYANSIBLE_STRATEGY_PLUGINS
Colon separated paths in which Ansible will search for Strategy Plugins.
See also DEFAULT_STRATEGY_PLUGIN_PATHANSIBLE_SU
Toggle the use of “su” for tasks.
See also DEFAULT_SUANSIBLE_SYSLOG_FACILITY
Syslog facility to use when Ansible logs to the remote target
See also DEFAULT_SYSLOG_FACILITYANSIBLE_TERMINAL_PLUGINS
Colon separated paths in which Ansible will search for Terminal Plugins.
See also DEFAULT_TERMINAL_PLUGIN_PATHANSIBLE_TEST_PLUGINS
Colon separated paths in which Ansible will search for Jinja2 Test Plugins.
See also DEFAULT_TEST_PLUGIN_PATHANSIBLE_TIMEOUT
This is the default timeout for connection plugins to use.
See also DEFAULT_TIMEOUTANSIBLE_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_TRANSPORTANSIBLE_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_BEHAVIORANSIBLE_VARS_PLUGINS
Colon separated paths in which Ansible will search for Vars Plugins.
See also DEFAULT_VARS_PLUGIN_PATHANSIBLE_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_MATCHANSIBLE_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_IDENTITYANSIBLE_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_IDENTITYANSIBLE_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_LISTANSIBLE_VAULT_PASSWORD_FILE
The vault password file to use. Equivalent to –vault-password-file or –vault-idIf executable, it will be run and the resulting stdout will be used as the password.
See also DEFAULT_VAULT_PASSWORD_FILEANSIBLE_VERBOSITY
Sets the default verbosity, equivalent to the number of -v
passed in the command line.
See also DEFAULT_VERBOSITYANSIBLE_DEPRECATION_WARNINGS
Toggle to control the showing of deprecation warnings
See also DEPRECATION_WARNINGSANSIBLE_DEVEL_WARNING
Toggle to control showing warnings related to running devel
See also DEVEL_WARNINGANSIBLE_DIFF_ALWAYS
Configuration toggle to tell modules to show differences when in ‘changed’ status, equivalent to --diff
.
See also DIFF_ALWAYSANSIBLE_DIFF_CONTEXT
How many lines of context to show when displaying the differences between files.
See also DIFF_CONTEXTANSIBLE_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_STDOUTDISPLAY_SKIPPED_HOSTS
Toggle to control displaying skipped task/host entries in a task in the default callback
See also DISPLAY_SKIPPED_HOSTSDeprecated in
2.12Deprecated detail
environment variables without ANSIBLE_
prefix are deprecatedDeprecated alternatives
the ANSIBLE_DISPLAY_SKIPPED_HOSTS
environment variableANSIBLE_DISPLAY_SKIPPED_HOSTS
Toggle to control displaying skipped task/host entries in a task in the default callback
See also DISPLAY_SKIPPED_HOSTSANSIBLE_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_KEYANSIBLE_ERROR_ON_MISSING_HANDLER
Toggle to allow missing handlers to become a warning instead of an error when notifying.
See also ERROR_ON_MISSING_HANDLERANSIBLE_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_MODULESANSIBLE_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_CERTSANSIBLE_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_SKELETONANSIBLE_GALAXY_ROLE_SKELETON_IGNORE
patterns of files to ignore inside a Galaxy role or collection skeleton directory
See also GALAXY_ROLE_SKELETON_IGNOREANSIBLE_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_SERVERANSIBLE_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_LISTANSIBLE_GALAXY_TOKEN_PATH
Local path to galaxy access token file
See also GALAXY_TOKEN_PATHANSIBLE_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_PROGRESSANSIBLE_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_DIRANSIBLE_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_CHECKINGANSIBLE_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_MISMATCHANSIBLE_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
(the default), auto_silent
, auto_legacy
, and auto_legacy_silent
. 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
or auto_legacy_silent
. The 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.
See also INTERPRETER_PYTHONANSIBLE_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_CHARSANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED
If ‘false’, invalid attributes for a task will result in warnings instead of errors
See also INVALID_TASK_ATTRIBUTE_FAILEDANSIBLE_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_FAILEDANSIBLE_INVENTORY_CACHE
Toggle to turn on inventory caching.This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins.The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory configuration.This message will be removed in 2.16.
See also INVENTORY_CACHE_ENABLEDANSIBLE_INVENTORY_CACHE_PLUGIN
The plugin for caching inventory.This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins.The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.This message will be removed in 2.16.
See also INVENTORY_CACHE_PLUGINANSIBLE_INVENTORY_CACHE_CONNECTION
The inventory cache connection.This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins.The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.This message will be removed in 2.16.
See also INVENTORY_CACHE_PLUGIN_CONNECTIONANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
The table prefix for the cache plugin.This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins.The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.This message will be removed in 2.16.
See also INVENTORY_CACHE_PLUGIN_PREFIXANSIBLE_INVENTORY_CACHE_TIMEOUT
Expiration timeout for the inventory cache plugin data.This setting has been moved to the individual inventory plugins as a plugin option Inventory plugins.The existing configuration settings are still accepted with the inventory plugin adding additional options from inventory and fact cache configuration.This message will be removed in 2.16.
See also INVENTORY_CACHE_TIMEOUTANSIBLE_INVENTORY_ENABLED
List of enabled inventory plugins, it also determines the order in which they are used.
See also INVENTORY_ENABLEDANSIBLE_INVENTORY_EXPORT
Controls if ansible-inventory will accurately reflect Ansible’s view into inventory or its optimized for exporting.
See also INVENTORY_EXPORTANSIBLE_INVENTORY_IGNORE
List of extensions to ignore when using a directory as an inventory source
See also INVENTORY_IGNORE_EXTSANSIBLE_INVENTORY_IGNORE_REGEX
List of patterns to ignore when using a directory as an inventory source
See also INVENTORY_IGNORE_PATTERNSANSIBLE_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_FAILEDANSIBLE_MAX_DIFF_SIZE
Maximum size of files to be considered for diff display
See also MAX_FILE_SIZE_FOR_DIFFANSIBLE_JINJA2_NATIVE_WARNING
Toggle to control showing warnings related to running a Jinja version older than required for jinja2_native
See also JINJA2_NATIVE_WARNINGNETWORK_GROUP_MODULES
See also NETWORK_GROUP_MODULESDeprecated in
2.12Deprecated detail
environment variables without ANSIBLE_
prefix are deprecatedDeprecated alternatives
the ANSIBLE_NETWORK_GROUP_MODULES
environment variableANSIBLE_NETWORK_GROUP_MODULES
See also NETWORK_GROUP_MODULESANSIBLE_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_VARSANSIBLE_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_EXTSANSIBLE_OLD_PLUGIN_CACHE_CLEAR
Previously 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_CLEARINGANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
See also PARAMIKO_HOST_KEY_AUTO_ADDANSIBLE_PARAMIKO_LOOK_FOR_KEYS
See also PARAMIKO_LOOK_FOR_KEYSANSIBLE_PERSISTENT_CONTROL_PATH_DIR
Path to socket to be used by the connection persistence system.
See also PERSISTENT_CONTROL_PATH_DIRANSIBLE_PERSISTENT_CONNECT_TIMEOUT
This controls how long the persistent connection will remain idle before it is destroyed.
See also PERSISTENT_CONNECT_TIMEOUTANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT
This controls the retry timeout for persistent connection to connect to the local domain socket.
See also PERSISTENT_CONNECT_RETRY_TIMEOUTANSIBLE_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_TIMEOUTANSIBLE_PLAYBOOK_DIR
A number of non-playbook CLIs have a --playbook-dir
argument; this sets the default value for it.
See also PLAYBOOK_DIRANSIBLE_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_ROOTANSIBLE_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_NOFILEANSIBLE_RETRY_FILES_ENABLED
This controls whether a failed Ansible playbook should create a .retry file.
See also RETRY_FILES_ENABLEDANSIBLE_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_PATHANSIBLE_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_PLUGINSANSIBLE_SHOW_CUSTOM_STATS
This adds the custom stats set via the set_stats plugin to the default output
See also SHOW_CUSTOM_STATSANSIBLE_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_FILTERSANSIBLE_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_WARNINGSANSIBLE_RUN_TAGS
default list of tags to run in your plays, Skip Tags has precedence.
See also TAGS_RUNANSIBLE_SKIP_TAGS
default list of tags to skip in your plays, has precedence over Run Tags
See also TAGS_SKIPANSIBLE_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_TIMEOUTANSIBLE_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_COUNTANSIBLE_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_DELAYANSIBLE_USE_PERSISTENT_CONNECTIONS
Toggles the use of persistence for connections.
See also USE_PERSISTENT_CONNECTIONSANSIBLE_VARS_ENABLED
Whitelist for variable plugins that require it.
See also VARIABLE_PLUGINS_ENABLEDANSIBLE_PRECEDENCE
Allows to change the group variable precedence merge order.
See also VARIABLE_PRECEDENCEANSIBLE_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_TIMEOUTANSIBLE_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_EXTENSIONSANSIBLE_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_CONFIGANSIBLE_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_ACTIONANSIBLE_VALIDATE_ACTION_GROUP_METADATA
A toggle to disable validating a collection’s ‘metadata’ entry for a module_defaults action group. Metadata containing unexpected fields or value types will produce a warning when this is True.
See also VALIDATE_ACTION_GROUP_METADATAANSIBLE_VERBOSE_TO_STDERR
Force ‘verbose’ option to use stderr instead of stdout
See also VERBOSE_TO_STDERR