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 result_format is set to yaml this option defaults to true, and defaults to false when configured to json.

Setting this option to true will force json and yaml results to always be pretty printed regardless of verbosity.

When set to true and used with the yaml result 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 to false or set result_format to json.

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 --tree option 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 RUN at the beginning and ending of playbook execution (when calling ansible-playbook --check) and CHECK MODE as a suffix at every play and task that is run in check mode.

Used by: ansible.builtin.default callback plugin

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 rather than STDOUT.

Used by: ansible.builtin.default callback plugin

ANSIBLE_DISPLAY_OK_HOSTS

Toggle to control displaying ‘ok’ task/host results in a task.

Used by: ansible.builtin.default callback plugin

ANSIBLE_INVENTORY_PLUGIN_EXTS

list of ‘valid’ extensions for files containing YAML

Used by: ansible.builtin.yaml inventory plugin

ANSIBLE_INVENTORY_PLUGIN_SCRIPT_STDERR

Toggle display of stderr even when script was successful

Used by: ansible.builtin.script inventory plugin

ANSIBLE_INVENTORY_USE_EXTRA_VARS

Merge extra vars into the available variables for composition (highest precedence).

Used by: ansible.builtin.constructed inventory plugin

ANSIBLE_LOOKUP_URL_AGENT

User-Agent to use in the request. The default was changed in 2.11 to ansible-httpget.

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_CIPHERS

SSL/TLS Ciphers to use for the request

When a list is provided, all ciphers are joined in order with :

See the OpenSSL Cipher List Format for more details.

The available ciphers is dependent on the Python and OpenSSL/LibreSSL versions

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

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_FORCE_BASIC_AUTH

Force basic authentication

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_LOOKUP_URL_USE_NETRC

Determining whether to use credentials from ``~/.netrc`` file

By default .netrc is used with Basic authentication headers

When set to False, .netrc credentials are ignored

Used by: ansible.builtin.url lookup plugin

ANSIBLE_PARAMIKO_BANNER_TIMEOUT

Configures, in seconds, the amount of time to wait for the SSH banner to be presented. This option is supported by paramiko version 1.15.0 or newer.

Used by: ansible.builtin.paramiko_ssh connection 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

Used by: ansible.builtin.paramiko_ssh connection plugin

ANSIBLE_PARAMIKO_PRIVATE_KEY_FILE

Path to private key file to use for authentication.

Used by: ansible.builtin.paramiko_ssh connection plugin

ANSIBLE_PARAMIKO_PROXY_COMMAND

Proxy information for running the connection via a jumphost.

Used by: ansible.builtin.paramiko_ssh connection plugin

ANSIBLE_PARAMIKO_PTY

SUDO usually requires a PTY, True to give a PTY and False to not give a PTY.

Used by: ansible.builtin.paramiko_ssh connection plugin

ANSIBLE_PARAMIKO_RECORD_HOST_KEYS

Save the host keys to a file

Used by: ansible.builtin.paramiko_ssh connection plugin

ANSIBLE_PARAMIKO_REMOTE_USER

User to login/authenticate as

Can be set from the CLI via the --user or -u options.

Used by: ansible.builtin.paramiko_ssh connection plugin

ANSIBLE_PARAMIKO_TIMEOUT

Number of seconds until the plugin gives up on failing to establish a TCP connection.

Used by: ansible.builtin.paramiko_ssh connection plugin

ANSIBLE_PARAMIKO_USE_RSA_SHA2_ALGORITHMS

Whether or not to enable RSA SHA2 algorithms for pubkeys and hostkeys

On paramiko versions older than 2.9, this only affects hostkeys

For behavior matching paramiko<2.9 set this to False

Used by: ansible.builtin.paramiko_ssh connection plugin

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.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_REMOTE_PARAMIKO_PORT

Remote port to connect to.

Used by: ansible.builtin.paramiko_ssh connection plugin

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 scp which will use the first binary available in $PATH.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SCP_EXTRA_ARGS

Extra exclusive to the scp CLI

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SFTP_BATCH_MODE

TODO: write it

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SFTP_EXECUTABLE

This defines the location of the sftp binary. It defaults to sftp which will use the first binary available in $PATH.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SFTP_EXTRA_ARGS

Extra exclusive to the sftp CLI

Used by: ansible.builtin.ssh connection plugin

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 starts to execute for each host.

Used by: ansible.builtin.default callback plugin

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 -vv or greater verbosity.

Used by: ansible.builtin.default callback plugin

ANSIBLE_SSH_ARGS

Arguments to pass to all SSH CLI tools.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SSH_COMMON_ARGS

Common extra args for all SSH CLI tools.

Used by: 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 ControlPath is set in ssh args.

Used by: ansible.builtin.ssh connection plugin

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.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SSH_EXECUTABLE

This defines the location of the SSH binary. It defaults to ssh which will use the first SSH binary available in $PATH.

This option is usually not required, it might be useful when access to system SSH is restricted, or when using SSH wrappers to connect to remote hosts.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SSH_EXTRA_ARGS

Extra exclusive to the SSH CLI.

Used by: 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.

Used by: ansible.builtin.ssh connection plugin

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.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SSH_TIMEOUT

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_TRANSFER_METHOD

Preferred method to use when transferring files over ssh

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SSH_USETTY

add -tt to ssh commands to force tty allocation.

Used by: ansible.builtin.ssh connection plugin

ANSIBLE_SSHPASS_PROMPT

Password prompt that sshpass should search for. Supported by sshpass 1.06 and up.

Defaults to Enter PIN for when pkcs11_provider is set.

Used by: ansible.builtin.ssh connection plugin

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_tmp against, 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_tmp is 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 all will run the vars plugin after importing inventory and whenever it is demanded by a task.

Setting this option to task will only run the vars plugin whenever it is demanded by a task.

Setting this option to inventory will 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.

Used by: ansible.builtin.host_group_vars vars plugin

JUNIT_FAIL_ON_CHANGE

Consider any tasks reporting “changed” as a junit test failure

Used by: ansible.builtin.junit callback plugin

JUNIT_FAIL_ON_IGNORE

Consider failed tasks as a junit test failure even if ignore_on_error is set

Used by: ansible.builtin.junit callback plugin

JUNIT_HIDE_TASK_ARGUMENTS

Hide the arguments for a task

Used by: ansible.builtin.junit callback plugin

JUNIT_INCLUDE_SETUP_TASKS_IN_REPORT

Should the setup tasks be included in the final report

Used by: ansible.builtin.junit callback plugin

JUNIT_OUTPUT_DIR

Directory to write XML files to.

Used by: ansible.builtin.junit callback plugin

JUNIT_REPLACE_OUT_OF_TREE_PATH

Replace the directory portion of an out-of-tree relative task path with the given placeholder

Used by: ansible.builtin.junit callback plugin

JUNIT_TASK_CLASS

Configure the output to be one class per yaml file

Used by: ansible.builtin.junit callback plugin

JUNIT_TASK_RELATIVE_PATH

Configure the output to use relative paths to given directory

Used by: ansible.builtin.junit callback plugin

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.

Used by: ansible.builtin.junit callback plugin