1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #11010 from sillydong/devel

Add judgment to to fix path0 if ANSIBLE_CONFIG is set to a dir
This commit is contained in:
Brian Coca 2015-07-29 21:36:07 -04:00
commit 4b8e368039

View file

@ -78,6 +78,8 @@ def load_config_file():
path0 = os.getenv("ANSIBLE_CONFIG", None)
if path0 is not None:
path0 = os.path.expanduser(path0)
if os.path.isdir(path0):
path0 += "/ansible.cfg"
path1 = os.getcwd() + "/ansible.cfg"
path2 = os.path.expanduser("~/.ansible.cfg")
path3 = "/etc/ansible/ansible.cfg"