Technotes

Technotes for future me

Ansible cfg hierarchy

Ansible cfg hierarchy

Changes can be made and used in a configuration file which will be processed in the following order:

ANSIBLE_CONFIG (an environment variable)
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. Settings in files are not merged.

If you add a custom ansible.cfg in a project/playbook,
make sure you add in all the configuration you need—global overrides (e.g. in /etc/ansible/ansible.cfg) are not merged!

Last updated on 31 Jan 2021
Published on 11 Dec 2019
Edit on GitHub