diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 04e984d1c6d..9c3623892ec 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -56,8 +56,8 @@ def _get_config(p, section, key, env_var, default, boolean=True): 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):