Commit a6a4680e by James Cammarata

Fix variable naming issue in _load_tasks()

Fixes #6800
parent 6f34a633
...@@ -585,9 +585,9 @@ class Play(object): ...@@ -585,9 +585,9 @@ class Play(object):
include_filename = utils.path_dwim(dirname, include_file) include_filename = utils.path_dwim(dirname, include_file)
data = utils.parse_yaml_from_file(include_filename, vault_password=self.vault_password) data = utils.parse_yaml_from_file(include_filename, vault_password=self.vault_password)
if 'role_name' in x and data is not None: if 'role_name' in x and data is not None:
for x in data: for y in data:
if 'include' in x: if isinstance(y, dict) and 'include' in y:
x['role_name'] = new_role y['role_name'] = new_role
loaded = self._load_tasks(data, mv, default_vars, included_sudo_vars, list(included_additional_conditions), original_file=include_filename, role_name=new_role) loaded = self._load_tasks(data, mv, default_vars, included_sudo_vars, list(included_additional_conditions), original_file=include_filename, role_name=new_role)
results += loaded results += loaded
elif type(x) == dict: elif type(x) == dict:
......
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