mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Do not crash if current dir do not exist
This commit is contained in:
committed by
Brian Coca
parent
ff34f5548d
commit
02d9f14b8b
@@ -112,7 +112,10 @@ def load_config_file():
|
||||
path0 = os.path.expanduser(path0)
|
||||
if os.path.isdir(path0):
|
||||
path0 += "/ansible.cfg"
|
||||
path1 = os.getcwd() + "/ansible.cfg"
|
||||
try:
|
||||
path1 = os.getcwd() + "/ansible.cfg"
|
||||
except OSError:
|
||||
path1 = None
|
||||
path2 = os.path.expanduser("~/.ansible.cfg")
|
||||
path3 = "/etc/ansible/ansible.cfg"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user