From 65c8c691f7bfcf3256ae4c0494aa4ae369635ba1 Mon Sep 17 00:00:00 2001 From: Philip Schwartz Date: Fri, 11 Oct 2013 08:25:57 -0500 Subject: [PATCH] GH-4452 Corrected config load order to match docs with cwd > ~ > /etc Signed-off-by: Philip Schwartz --- lib/ansible/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index bf1df51a87e..b941483465d 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -34,8 +34,8 @@ def get_config(p, section, key, env_var, default): def load_config_file(): p = ConfigParser.ConfigParser() - path1 = os.path.expanduser(os.environ.get('ANSIBLE_CONFIG', "~/.ansible.cfg")) - path2 = os.getcwd() + "/ansible.cfg" + path1 = os.getcwd() + "/ansible.cfg" + path2 = os.path.expanduser(os.environ.get('ANSIBLE_CONFIG', "~/.ansible.cfg")) path3 = "/etc/ansible/ansible.cfg" if os.path.exists(path1):