mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4453 from pschwartz/fix_cfg_load_order_to_match_docs
GH-4452 Corrected config load order to match docs
This commit is contained in:
commit
d73a5da9e5
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue