mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-15 05:29:11 -07:00
Fix for traceback when neither name nor pkg are in the module params
This commit is contained in:
parent
b2a9111b22
commit
e45ce871a7
1 changed files with 13 additions and 10 deletions
|
@ -252,6 +252,9 @@ class TaskExecutor:
|
||||||
if all(isinstance(o, string_types) for o in items):
|
if all(isinstance(o, string_types) for o in items):
|
||||||
final_items = []
|
final_items = []
|
||||||
name = self._task.args.pop('name', None) or self._task.args.pop('pkg', None)
|
name = self._task.args.pop('name', None) or self._task.args.pop('pkg', None)
|
||||||
|
# The user is doing an upgrade or some other operation
|
||||||
|
# that doesn't take name or pkg.
|
||||||
|
if name:
|
||||||
for item in items:
|
for item in items:
|
||||||
variables['item'] = item
|
variables['item'] = item
|
||||||
if self._task.evaluate_conditional(templar, variables):
|
if self._task.evaluate_conditional(templar, variables):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue