Merge pull request #4453 from pschwartz/fix_cfg_load_order_to_match_docs

GH-4452 Corrected config load order to match docs
pull/4456/merge
James Cammarata 11 years ago
commit d73a5da9e5

@ -56,8 +56,8 @@ def _get_config(p, section, key, env_var, default, boolean=True):
def load_config_file(): def load_config_file():
p = ConfigParser.ConfigParser() p = ConfigParser.ConfigParser()
path1 = os.path.expanduser(os.environ.get('ANSIBLE_CONFIG', "~/.ansible.cfg")) path1 = os.getcwd() + "/ansible.cfg"
path2 = os.getcwd() + "/ansible.cfg" path2 = os.path.expanduser(os.environ.get('ANSIBLE_CONFIG', "~/.ansible.cfg"))
path3 = "/etc/ansible/ansible.cfg" path3 = "/etc/ansible/ansible.cfg"
if os.path.exists(path1): if os.path.exists(path1):

Loading…
Cancel
Save