Open-Source Wikis

/

Ansible

/

Reference

/

Configuration reference

ansible/ansible

Configuration reference

The single source of truth for ansible-core's config options is lib/ansible/config/base.yml. The narrative explanation is in Systems → Configuration.

File layout

lib/ansible/config/
├── __init__.py                       # Constants enumerating valid config kinds
├── base.yml                          # Every option: name, type, default, env, ini, version
├── manager.py                        # ConfigManager — reads sources, returns typed values
└── ansible_builtin_runtime.yml       # Plugin/module redirect map (separate concern)

Sources of values, in precedence order (high to low)

  1. CLI flags. Each CLI subclass adds its own.
  2. Environment variables. Listed in each option's env: block.
  3. ansible.cfg. Search order: $ANSIBLE_CONFIG./ansible.cfg~/.ansible.cfg/etc/ansible/ansible.cfg.
  4. Defaults from base.yml.

Categories of options (selected)

Prefix / area Examples
DEFAULT_* Forks, host pattern style, callbacks loaded, fact path
ANSIBLE_SSH_* ControlMaster path, SSH retries, transfer method, common args
INVENTORY_* Enabled inventory plugins, ignored extensions, ignored patterns
DEFAULT_BECOME* Method, user, password file, flags
GALAXY_* API server URL, signature requirement, ignore deprecated
COLLECTIONS_* Paths, on-missing-action
DEFAULT_VAULT_* Identity list, password file, ID match strictness
DEFAULT_*COLOR* UI colors, force/disable color
RETRY_FILES_* Where retry files go, whether to write them
DEFAULT_TIMEOUT Connection timeout
DEFAULT_GATHERING implicit vs explicit vs smart

For the full enumeration, see lib/ansible/config/base.yml or run:

ansible-config list

How a plugin declares its own options

Plugins extend the option set via their DOCUMENTATION block:

options:
  password:
    description: Password to authenticate with
    type: str
    vars:
      - name: ansible_password
    env:
      - name: ANSIBLE_PASSWORD
    ini:
      - { section: defaults, key: password }

The plugin loader registers these so self.get_option('password') walks the varsenvinidefault chain.

Inspection

ansible-config list                   # every option
ansible-config dump                   # only options with non-default values
ansible-config view                   # show the active ansible.cfg
ansible-config init --disabled        # template starter ansible.cfg
ansible-config validate file.cfg      # check for typos

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Configuration reference – Ansible wiki | Factory