Config resoution order correction and documentation.

This commit is contained in:
Richard C Isaacson 2014-02-14 14:34:58 -06:00
commit 80ddd1ca75
3 changed files with 30 additions and 20 deletions

View file

@ -5,17 +5,24 @@ The Ansible Configuration File
.. highlight:: bash
Certain things in Ansible are adjustable in a configuration file. In general, the stock configuration is probably
right for most users, but that doesn't mean you might not want to change them.
Certain settings in Ansible are adjustable via a configuration file. The stock configuration should be sufficient
for most users, but there may be reasons you would want to change them.
The mechanism for doing this is the "ansible.cfg" file, which is looked for in the following locations::
Changes can be made and used in a configuration file which will be processed processed in the following order::
* /etc/ansible/ansible.cfg
* ~/.ansible.cfg
* ANSIBLE_CONFIG (an environment variable)
* ansible.cfg (in the current directory)
* .ansible.cfg (in the home directory)
* /etc/ansible/ansible.cfg
If multiple file locations matching the above exist, the last location on the above list is used. Settings in files
are not merged together.
Prior to 1.5 the order was::
* ansible.cfg (in the current directory)
* ANSIBLE_CONFIG (an environment variable)
* .ansible.cfg (in the home directory)
* /etc/ansible/ansible.cfg
Ansible will process the above list and use the first file found. Settings in file are not merged together.
.. _getting_the_latest_configuration: