Commit 65c8c691 by Philip Schwartz

GH-4452 Corrected config load order to match docs with

cwd > ~ > /etc

Signed-off-by: Philip Schwartz <philip.schwartz@rackspace.com>
parent 0fc317de
...@@ -34,8 +34,8 @@ def get_config(p, section, key, env_var, default): ...@@ -34,8 +34,8 @@ def get_config(p, section, key, env_var, default):
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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment