Fix variable naming issue in _load_tasks()

Fixes #6800
pull/6808/merge
James Cammarata 11 years ago
parent 6f34a6336f
commit a6a4680e5c

@ -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:

Loading…
Cancel
Save