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

Pass through YAML parsed object instead of string. (#2347)

This commit is contained in:
David Edmonds 2016-07-22 22:03:40 +01:00 committed by Matt Clay
parent 41d68b5498
commit ec0fff49ea

View file

@ -334,7 +334,10 @@ def main():
file_reference = module.params.get('file_reference') file_reference = module.params.get('file_reference')
if inline_data: if inline_data:
data = inline_data if not isinstance(inline_data, dict) and not isinstance(inline_data, list):
data = yaml.load(inline_data)
else:
data = inline_data
else: else:
try: try:
f = open(file_reference, "r") f = open(file_reference, "r")