mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make sure yaml data loaded for role is valid before using it
Fixes #4322
This commit is contained in:
parent
bff47df5ff
commit
8a3f8b757b
1 changed files with 1 additions and 1 deletions
|
@ -449,7 +449,7 @@ class Play(object):
|
|||
include_file = template(dirname, tokens[0], mv)
|
||||
include_filename = utils.path_dwim(dirname, include_file)
|
||||
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:
|
||||
if 'include' in x:
|
||||
x['role_name'] = new_role
|
||||
|
|
Loading…
Reference in a new issue