From 49db16752febbe1dc0835fe6bdf1c8b6438026ad Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Thu, 13 Sep 2012 14:14:43 -0400 Subject: [PATCH] Can specify ansible.cfg in current directory. --- rst/examples.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rst/examples.rst b/rst/examples.rst index 55ffed03a2..3799ff8965 100644 --- a/rst/examples.rst +++ b/rst/examples.rst @@ -241,7 +241,15 @@ Configuration & Defaults .. versionadded:: 0.7 -Ansible has an optional configuration file that can be used to tune settings and also eliminate the need to pass various command line flags. The config file location is controlled by the ANSIBLE_CONFIG environment variable, if set, otherwise ~/.ansible.cfg or /etc/ansible/ansible.cfg will be loaded, whichever comes first. For those running from source, a sample configuration file lives in the examples/ directory. The RPM will install configuration into /etc/ansible/ansible.cfg automatically. +Ansible has an optional configuration file that can be used to tune settings and also eliminate the need to pass various command line flags. Ansible will look for the config file in the following order, using +the first config file it finds present: + +1. File specified by the ``ANSIBLE_CONFIG`` environment variable +2. ``ansible.cfg`` in the current working directory. (version 0.8 and up) +3. ``~/.ansible.cfg`` +4. ``/etc/ansible/ansible.cfg`` + +For those running from source, a sample configuration file lives in the examples/ directory. The RPM will install configuration into /etc/ansible/ansible.cfg automatically. .. seealso::