Commit 8a3f8b75 by James Cammarata

Make sure yaml data loaded for role is valid before using it

Fixes #4322
parent bff47df5
...@@ -449,7 +449,7 @@ class Play(object): ...@@ -449,7 +449,7 @@ class Play(object):
include_file = template(dirname, tokens[0], mv) include_file = template(dirname, tokens[0], mv)
include_filename = utils.path_dwim(dirname, include_file) include_filename = utils.path_dwim(dirname, include_file)
data = utils.parse_yaml_from_file(include_filename) data = utils.parse_yaml_from_file(include_filename)
if 'role_name' in x: if 'role_name' in x and data is not None:
for x in data: for x in data:
if 'include' in x: if 'include' in x:
x['role_name'] = new_role x['role_name'] = new_role
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment