Index of all Collection Environment Variables
The following index documents all environment variables declared by plugins in collections. Environment variables used by the ansible-core configuration are documented in Ansible Configuration Settings.
- ANSIBLE_ADMIN_USERS
list of users to be expected to have admin privileges. This is used by the controller to determine how to share temporary files between the remote user and the become user.
Used by: ansible.builtin.sh shell plugin
- ANSIBLE_ASYNC_DIR
Directory in which ansible will keep async job information
Used by: ansible.builtin.sh shell plugin
- ANSIBLE_BECOME_PASS
See the documentations for the options where this environment variable is used.
Used by: ansible.builtin.runas become plugin, ansible.builtin.su become plugin, ansible.builtin.sudo become plugin
- ANSIBLE_CALLBACK_FORMAT_PRETTY
Configure the result format to be more readable
When the result format is set to
yamlthis option defaults toTrue, and defaults toFalsewhen configured tojson.Setting this option to
Truewill forcejsonandyamlresults to always be pretty printed regardless of verbosity.When set to
Trueand used with theyamlresult format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, and should not be relied upon to aid in writing variable manipulations or conditionals. For correctness, set this option toFalseor set the result format tojson.Used by: ansible.builtin.default callback plugin, ansible.builtin.minimal callback plugin
- ANSIBLE_CALLBACK_RESULT_FORMAT
Define the task result format used in the callback output.
These formats do not cause the callback to emit valid JSON or YAML formats.
The output contains these formats interspersed with other non-machine parsable data.
Used by: ansible.builtin.default callback plugin, ansible.builtin.minimal callback plugin
- ANSIBLE_CALLBACK_TREE_DIR
directory that will contain the per host JSON files. Also set by the
--treeoption when using adhoc.Used by: ansible.builtin.tree callback plugin
- ANSIBLE_CHECK_MODE_MARKERS
Toggle to control displaying markers when running in check mode.
The markers are
DRY RUNat the beginning and ending of playbook execution (when callingansible-playbook --check) andCHECK MODEas a suffix at every play and task that is run in check mode.
- ANSIBLE_COMMON_REMOTE_GROUP
Checked when Ansible needs to execute a module as a different user.
If setfacl and chown both fail and do not let the different user access the module’s files, they will be chgrp’d to this group.
In order for this to work, the remote_user and become_user must share a common group and this setting must be set to that group.
Used by: ansible.builtin.sh shell plugin
- ANSIBLE_DISPLAY_FAILED_STDERR
Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT)
- ANSIBLE_DISPLAY_OK_HOSTS
Toggle to control displaying ‘ok’ task/host results in a task
- ANSIBLE_INVENTORY_PLUGIN_EXTS
list of ‘valid’ extensions for files containing YAML
- ANSIBLE_INVENTORY_PLUGIN_SCRIPT_STDERR
Toggle display of stderr even when script was successful
- ANSIBLE_INVENTORY_USE_EXTRA_VARS
Merge extra vars into the available variables for composition (highest precedence).
- ANSIBLE_LOOKUP_URL_AGENT
See the documentations for the options where this environment variable is used.
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_LOOKUP_URL_CA_PATH
String of file system path to CA cert bundle to use
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_LOOKUP_URL_FOLLOW_REDIRECTS
String of urllib2, all/yes, safe, none to determine how redirects are followed, see RedirectHandlerFactory for more information
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_LOOKUP_URL_FORCE
Whether or not to set “cache-control” header with value “no-cache”
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_LOOKUP_URL_TIMEOUT
How long to wait for the server to send data before giving up
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_LOOKUP_URL_UNIX_SOCKET
String of file system path to unix socket file to use when establishing connection to the provided url
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_LOOKUP_URL_UNREDIR_HEADERS
A list of headers to not attach on a redirected request
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_LOOKUP_URL_USE_GSSAPI
Use GSSAPI handler of requests
As of Ansible 2.11, GSSAPI credentials can be specified with username and password.
Used by: ansible.builtin.url lookup plugin
- ANSIBLE_PARAMIKO_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
- ANSIBLE_PARAMIKO_PROXY_COMMAND
Proxy information for running the connection via a jumphost
Also this plugin will scan ‘ssh_args’, ‘ssh_extra_args’ and ‘ssh_common_args’ from the ‘ssh’ plugin settings for proxy information if set.
- ANSIBLE_PARAMIKO_PTY
SUDO usually requires a PTY, True to give a PTY and False to not give a PTY.
- ANSIBLE_PARAMIKO_RECORD_HOST_KEYS
Save the host keys to a file
- ANSIBLE_PARAMIKO_REMOTE_USER
User to login/authenticate as
Can be set from the CLI via the
--useror-uoptions.
- ANSIBLE_PKCS11_PROVIDER
PKCS11 SmartCard provider such as opensc, example: /usr/local/lib/opensc-pkcs11.so
Requires sshpass version 1.06+, sshpass must support the -P option.
- ANSIBLE_REMOTE_TEMP
Temporary directory to use on targets when executing tasks.
Used by: ansible.builtin.sh shell plugin
- ANSIBLE_REMOTE_TMP
Temporary directory to use on targets when executing tasks.
Used by: ansible.builtin.sh shell plugin
- ANSIBLE_RUNAS_FLAGS
Options to pass to runas, a space delimited list of k=v pairs
Used by: ansible.builtin.runas become plugin
- ANSIBLE_RUNAS_PASS
password
Used by: ansible.builtin.runas become plugin
- ANSIBLE_RUNAS_USER
User you ‘become’ to execute the task
Used by: ansible.builtin.runas become plugin
- ANSIBLE_SCP_EXECUTABLE
This defines the location of the scp binary. It defaults to
scpwhich will use the first binary available in $PATH.
- ANSIBLE_SCP_EXTRA_ARGS
Extra exclusive to the
scpCLI
- ANSIBLE_SCP_IF_SSH
Preferred method to use when transferring files over SSH.
When set to smart, Ansible will try them until one succeeds or they all fail.
If set to True, it will force ‘scp’, if False it will use ‘sftp’.
For OpenSSH >=9.0 you must add an additional option to enable scp (scp_extra_args=”-O”)
This setting will overridden by ssh_transfer_method if set.
- ANSIBLE_SFTP_BATCH_MODE
TODO: write it
- ANSIBLE_SFTP_EXECUTABLE
This defines the location of the sftp binary. It defaults to
sftpwhich will use the first binary available in $PATH.
- ANSIBLE_SFTP_EXTRA_ARGS
Extra exclusive to the
sftpCLI
- ANSIBLE_SHELL_ALLOW_WORLD_READABLE_TEMP
This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task.
It is useful when becoming an unprivileged user.
Used by: ansible.builtin.sh shell plugin
- ANSIBLE_SHOW_PER_HOST_START
This adds output that shows when a task is started to execute for each host
- ANSIBLE_SHOW_TASK_PATH_ON_FAILURE
When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with
-vvor greater verbosity.
- ANSIBLE_SSH_ARGS
See the documentations for the options where this environment variable is used.
Used by: ansible.builtin.paramiko_ssh connection plugin, ansible.builtin.ssh connection plugin
- ANSIBLE_SSH_COMMON_ARGS
See the documentations for the options where this environment variable is used.
Used by: ansible.builtin.paramiko_ssh connection plugin, ansible.builtin.ssh connection plugin
- ANSIBLE_SSH_CONTROL_PATH
This is the location to save SSH’s ControlPath sockets, it uses SSH’s variable substitution.
Since 2.3, if null (default), ansible will generate a unique hash. Use ``%(directory)s`` to indicate where to use the control dir path setting.
Before 2.3 it defaulted to ``control_path=%(directory)s/ansible-ssh-%%h-%%p-%%r``.
Be aware that this setting is ignored if
-o ControlPathis set in ssh args.
- ANSIBLE_SSH_CONTROL_PATH_DIR
This sets the directory to use for ssh control path if the control path setting is null.
Also, provides the ``%(directory)s`` variable for the control path setting.
- ANSIBLE_SSH_EXECUTABLE
This defines the location of the SSH binary. It defaults to
sshwhich will use the first SSH binary available in $PATH.This option is usually not required, it might be useful when access to system SSH is restricted, or when using SSH wrappers to connect to remote hosts.
- ANSIBLE_SSH_EXTRA_ARGS
See the documentations for the options where this environment variable is used.
Used by: ansible.builtin.paramiko_ssh connection plugin, ansible.builtin.ssh connection plugin
- ANSIBLE_SSH_HOST_KEY_CHECKING
See the documentations for the options where this environment variable is used.
Used by: ansible.builtin.paramiko_ssh connection plugin, ansible.builtin.ssh connection plugin
- ANSIBLE_SSH_PIPELINING
Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers.
This can result in a very significant performance improvement when enabled.
However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable ‘requiretty’ in the sudoers file for the target hosts, which is why this feature is disabled by default.
- ANSIBLE_SSH_RETRIES
Number of attempts to connect.
Ansible retries connections only if it gets an SSH error with a return code of 255.
Any errors with return codes other than 255 indicate an issue with program execution.
- ANSIBLE_SSH_TIMEOUT
This is the default amount of time we will wait while establishing an SSH connection.
It also controls how long we can wait to access reading the connection once established (select on the socket).
- ANSIBLE_SSH_TRANSFER_METHOD
Preferred method to use when transferring files over ssh
Setting to ‘smart’ (default) will try them in order, until one succeeds or they all fail
For OpenSSH >=9.0 you must add an additional option to enable scp (scp_extra_args=”-O”)
Using ‘piped’ creates an ssh pipe with
ddon either side to copy the data
- ANSIBLE_SSH_USETTY
add -tt to ssh commands to force tty allocation.
- ANSIBLE_SSHPASS_PROMPT
Password prompt that sshpass should search for. Supported by sshpass 1.06 and up.
Defaults to
Enter PIN forwhen pkcs11_provider is set.
- ANSIBLE_SU_EXE
Su executable
Used by: ansible.builtin.su become plugin
- ANSIBLE_SU_FLAGS
Options to pass to su
Used by: ansible.builtin.su become plugin
- ANSIBLE_SU_PASS
Password to pass to su
Used by: ansible.builtin.su become plugin
- ANSIBLE_SU_PROMPT_L10N
List of localized strings to match for prompt detection
If empty we’ll use the built in one
Do NOT add a colon (:) to your custom entries. Ansible adds a colon at the end of each prompt; if you add another one in your string, your prompt will fail with a “Timeout” error.
Used by: ansible.builtin.su become plugin
- ANSIBLE_SU_USER
User you ‘become’ to execute the task
Used by: ansible.builtin.su become plugin
- ANSIBLE_SUDO_EXE
Sudo executable
Used by: ansible.builtin.sudo become plugin
- ANSIBLE_SUDO_FLAGS
Options to pass to sudo
Used by: ansible.builtin.sudo become plugin
- ANSIBLE_SUDO_PASS
Password to pass to sudo
Used by: ansible.builtin.sudo become plugin
- ANSIBLE_SUDO_USER
User you ‘become’ to execute the task
Used by: ansible.builtin.sudo become plugin
- ANSIBLE_SYSTEM_TMPDIRS
List of valid system temporary directories on the managed machine for Ansible to validate
remote_tmpagainst, when specific permissions are needed. These must be world readable, writable, and executable. This list should only contain directories which the system administrator has pre-created with the proper ownership and permissions otherwise security issues can arise.When
remote_tmpis required to be a system temp dir and it does not match any in the list, the first one from the list will be used instead.Used by: ansible.builtin.sh shell plugin
- ANSIBLE_VARS_PLUGIN_STAGE
Control when this vars plugin may be executed.
Setting this option to
allwill run the vars plugin after importing inventory and whenever it is demanded by a task.Setting this option to
taskwill only run the vars plugin whenever it is demanded by a task.Setting this option to
inventorywill only run the vars plugin after parsing inventory.If this option is omitted, the global RUN_VARS_PLUGINS configuration is used to determine when to execute the vars plugin.
- JUNIT_FAIL_ON_CHANGE
Consider any tasks reporting “changed” as a junit test failure
- JUNIT_FAIL_ON_IGNORE
Consider failed tasks as a junit test failure even if ignore_on_error is set
- JUNIT_HIDE_TASK_ARGUMENTS
Hide the arguments for a task
- JUNIT_INCLUDE_SETUP_TASKS_IN_REPORT
Should the setup tasks be included in the final report
- JUNIT_OUTPUT_DIR
Directory to write XML files to.
- JUNIT_REPLACE_OUT_OF_TREE_PATH
Replace the directory portion of an out-of-tree relative task path with the given placeholder
- JUNIT_TASK_CLASS
Configure the output to be one class per yaml file
- JUNIT_TASK_RELATIVE_PATH
Configure the output to use relative paths to given directory
- JUNIT_TEST_CASE_PREFIX
Consider a task only as test case if it has this value as prefix. Additionally failing tasks are recorded as failed test cases.