1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixes 11448 , yum with with_items

This commit is contained in:
Benno Joy 2015-07-01 10:02:54 +05:30
parent 468770c894
commit 4889d04fc6

View file

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