From a6a4680e5c4aede0ee3ba617a7c0a12a2f62fa90 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 2 Apr 2014 16:13:22 -0500 Subject: [PATCH] Fix variable naming issue in _load_tasks() Fixes #6800 --- lib/ansible/playbook/play.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 402ae0d5fd..93af7e6a29 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -585,9 +585,9 @@ class Play(object): include_filename = utils.path_dwim(dirname, include_file) data = utils.parse_yaml_from_file(include_filename, vault_password=self.vault_password) if 'role_name' in x and data is not None: - for x in data: - if 'include' in x: - x['role_name'] = new_role + for y in data: + if isinstance(y, dict) and 'include' in y: + 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) results += loaded elif type(x) == dict: