mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
parent
1eb5b42705
commit
ac6f61ec7f
2 changed files with 16 additions and 4 deletions
|
@ -317,9 +317,9 @@ class VariableManager:
|
|||
else:
|
||||
file_name, ext = os.path.splitext(path)
|
||||
data = None
|
||||
if not ext:
|
||||
for ext in C.YAML_FILENAME_EXTENSIONS:
|
||||
new_path = path + ext
|
||||
if not ext or ext not in C.YAML_FILENAME_EXTENSIONS:
|
||||
for test_ext in C.YAML_FILENAME_EXTENSIONS:
|
||||
new_path = path + test_ext
|
||||
if loader.path_exists(new_path):
|
||||
data = loader.load_from_file(new_path)
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue