From 4889d04fc623ac0a5081d1ff4d99fd236440804f Mon Sep 17 00:00:00 2001 From: Benno Joy Date: Wed, 1 Jul 2015 10:02:54 +0530 Subject: [PATCH] fixes 11448 , yum with with_items --- lib/ansible/executor/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 1f46b0c705a..1bfc88d8f2e 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -181,11 +181,11 @@ class TaskExecutor: ''' if len(items) > 0 and self._task.action in self.SQUASH_ACTIONS: final_items = [] + name = self._task.args.pop('name', None) or self._task.args.pop('pkg', None) for item in items: variables['item'] = item templar = Templar(loader=self._loader, shared_loader_obj=self._shared_loader_obj, variables=variables) if self._task.evaluate_conditional(templar, variables): - name = self._task.args.pop('name', None) or self._task.args.pop('pkg', None) if templar._contains_vars(name): new_item = templar.template(name) final_items.append(new_item)