mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Merge pull request #11458 from bennojoy/11448
fixes 11448 , yum with with_items
This commit is contained in:
@@ -181,11 +181,11 @@ class TaskExecutor:
|
|||||||
'''
|
'''
|
||||||
if len(items) > 0 and self._task.action in self.SQUASH_ACTIONS:
|
if len(items) > 0 and self._task.action in self.SQUASH_ACTIONS:
|
||||||
final_items = []
|
final_items = []
|
||||||
|
name = self._task.args.pop('name', None) or self._task.args.pop('pkg', None)
|
||||||
for item in items:
|
for item in items:
|
||||||
variables['item'] = item
|
variables['item'] = item
|
||||||
templar = Templar(loader=self._loader, shared_loader_obj=self._shared_loader_obj, variables=variables)
|
templar = Templar(loader=self._loader, shared_loader_obj=self._shared_loader_obj, variables=variables)
|
||||||
if self._task.evaluate_conditional(templar, 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):
|
if templar._contains_vars(name):
|
||||||
new_item = templar.template(name)
|
new_item = templar.template(name)
|
||||||
final_items.append(new_item)
|
final_items.append(new_item)
|
||||||
|
|||||||
Reference in New Issue
Block a user