Default Settings - Ansible: Up and Running (2015)

Ansible: Up and Running (2015)

Appendix B. Default Settings

Ansible defines a number of settings. You can override the default values of these settings in the Ansible configuration file or as an environment variable.

The configuration file is broken up into the following sections:

§ defaults

§ ssh_connection

§ paramiko

§ accelerate

Config name

Environment variable

Default value

hostfile

ANSIBLE_HOSTS

/etc/ansible/hosts

library

ANSIBLE_LIBRARY

(none)

roles_path

ANSIBLE_ROLES_PATH

/etc/ansible/roles

remote_tmp

ANSIBLE_REMOTE_TEMP

$HOME/.ansible/tmp

module_name

(none)

command

pattern

(none)

*

forks

ANSIBLE_FORKS

5

module_args

ANSIBLE_MODULE_ARGS

(empty string)

module_lang

ANSIBLE_MODULE_LANG

en_US.UTF-8

timeout

ANSIBLE_TIMEOUT

10

poll_interval

ANSIBLE_POLL_INTERVAL

15

remote_user

ANSIBLE_REMOTE_USER

current user

ask_pass

ANSIBLE_ASK_PASS

false

private_key_file

ANSIBLE_PRIVATE_KEY_FILE

(none)

sudo_user

ANSIBLE_SUDO_USER

root

ask_sudo_pass

ANSIBLE_ASK_SUDO_PASS

false

remote_port

ANSIBLE_REMOTE_PORT

(none)

ask_vault_pass

ANSIBLE_ASK_VAULT_PASS

false

vault_password_file

ANSIBLE_VAULT_PASSWORD_FILE

(none)

ansible_managed

(none)

Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}

syslog_facility

ANSIBLE_SYSLOG_FACILITY

LOG_USER

keep_remote_files

ANSIBLE_KEEP_REMOTE_FILES

true

sudo

ANSIBLE_SUDO

false

sudo_exe

ANSIBLE_SUDO_EXE

sudo

sudo_flags

ANSIBLE_SUDO_FLAGS

-H

hash_behaviour

ANSIBLE_HASH_BEHAVIOUR

replace

jinja2_extensions

ANSIBLE_JINJA2_EXTENSIONS

(none)

su_exe

ANSIBLE_SU_EXE

su

su

ANSIBLE_SU

false

su_flag

ANSIBLE_SU_FLAGS

(empty string)

su_user

ANSIBLE_SU_USER

root

ask_su_pass

ANSIBLE_ASK_SU_PASS

false

gathering

ANSIBLE_GATHERING

implicit

action_plugins

ANSIBLE_ACTION_PLUGINS

/usr/share/ansible_plugins/action_plugins

cache_plugins

ANSIBLE_CACHE_PLUGINS

/usr/share/ansible_plugins/cache_plugins

callback_plugins

ANSIBLE_CALLBACK_PLUGINS

/usr/share/ansible_plugins/callback_plugins

connection_plugins

ANSIBLE_CONNECTION_PLUGINS

/usr/share/ansible_plugins/connection_plugins

lookup_plugins

ANSIBLE_LOOKUP_PLUGINS

/usr/share/ansible_plugins/lookup_plugins

vars_plugins

ANSIBLE_VARS_PLUGINS

/usr/share/ansible_plugins/vars_plugins

filter_plugins

ANSIBLE_FILTER_PLUGINS

/usr/share/ansible_plugins/filter_plugins

log_path

ANSIBLE_LOG_PATH

(empty string)

fact_caching

ANSIBLE_CACHE_PLUGIN

memory

fact_caching_connection

ANSIBLE_CACHE_PLUGIN_CONNECTION

(none)

fact_caching_prefix

ANSIBLE_CACHE_PLUGIN_PREFIX

ansible_facts

fact_caching_timeout

ANSIBLE_CACHE_PLUGIN_TIMEOUT

86400 (seconds)

force_color

ANSIBLE_FORCE_COLOR

(none)

nocolor

ANSIBLE_NOCOLOR

(none)

nocows

ANSIBLE_NOCOWS

(none)

display_skipped_hosts

DISPLAY_SKIPPED_HOSTS

true

error_on_undefined_vars

ANSIBLE_ERROR_ON_UNDEFINED_VARS

true

host_key_checking

ANSIBLE_HOST_KEY_CHECKING

true

system_warnings

ANSIBLE_SYSTEM_WARNINGS

true

deprecation_warnings

ANSIBLE_DEPRECATION_WARNINGS

true

callable_whitelist

ANSIBLE_CALLABLE_WHITELIST

(empty list)

command_warnings

ANSIBLE_COMMAND_WARNINGS

false

bin_ansible_callbacks

ANSIBLE_LOAD_CALLBACK_PLUGINS

false

Table B-1. Defaults section

NOTE

If you installed Ansible using a package manager, then default paths for the plug-ins might be different than those listed here, since the downstream package manager might have modified the default locations of Ansible-related files from what is specified in the upstream Ansible project.

Config name

Environment variable

Default value

ssh_args

ANSIBLE_SSH_ARGS

-o ControlMaster=auto -o ControlPersist=60s -o ControlPath="$ANSIBLE_SSH_CONTROL_PATH”

control_path

ANSIBLE_SSH_CONTROL_PATH

%(directory)s/ansible-ssh-%%h-%%p-%%r

pipelining

ANSIBLE_SSH_PIPELINING

false

scp_if_ssh

ANSIBLE_SCP_IF_SSH

false

Table B-2. ssh_connection section

Ansible substitutes the %(directory)s variable in the \_control_path config file to $HOME/.ansible/cp.

Config name

Environment variable

Default value

record_host_keys

ANSIBLE_PARAMIKO_RECORD_HOST_KEYS

true

pty

ANSIBLE_PARAMIKO_PTY

true

Table B-3. paramiko section

Config name

Environment variable

Default value

accelerate_keys_dir

ACCELERATE_KEYS_DIR

\~/.fireball.keys

accelerate_keys_dir_perms

ACCELERATE_KEYS_DIR_PERMS

700

accelerate_keys_file_perms

ACCELERATE_KEYS_FILE_PERMS

600

accelerate_multi_key

ACCELERATE_MULTI_KEY

false

Table B-4. accelerate section