mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
parent
51e014d915
commit
ff04b2b532
3 changed files with 7 additions and 6 deletions
|
@ -91,10 +91,10 @@ def _load_vars_from_path(path, results, vault_password=None):
|
|||
# regular file
|
||||
elif stat.S_ISREG(pathstat.st_mode):
|
||||
data = utils.parse_yaml_from_file(path, vault_password=vault_password)
|
||||
if type(data) != dict:
|
||||
raise errors.AnsibleError(
|
||||
"%s must be stored as a dictionary/hash" % path)
|
||||
|
||||
if data and type(data) != dict:
|
||||
raise errors.AnsibleError("%s must be stored as a dictionary/hash" % path)
|
||||
elif data is None:
|
||||
data = {}
|
||||
# combine vars overrides by default but can be configured to do a
|
||||
# hash merge in settings
|
||||
results = utils.combine_vars(results, data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue