mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-28 03:49:09 -07:00
parent
51e014d915
commit
ff04b2b532
3 changed files with 7 additions and 6 deletions
|
@ -44,8 +44,10 @@ class ActionModule(object):
|
|||
|
||||
if os.path.exists(source):
|
||||
data = utils.parse_yaml_from_file(source, vault_password=self.runner.vault_pass)
|
||||
if type(data) != dict:
|
||||
if data and type(data) != dict:
|
||||
raise errors.AnsibleError("%s must be stored as a dictionary/hash" % source)
|
||||
elif data is None:
|
||||
data = {}
|
||||
result = dict(ansible_facts=data)
|
||||
return ReturnData(conn=conn, comm_ok=True, result=result)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue