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

Save module name and args when processing list of items.

This is necessary because daisy-chained modules will overwrite
these values.
This commit is contained in:
Lorin Hochstein 2012-07-25 13:26:07 -04:00
parent 8d7f526df6
commit b63a3bd0c7

View file

@ -492,7 +492,12 @@ class Runner(object):
all_changed = False all_changed = False
all_failed = False all_failed = False
results = [] results = []
# Save module name and args since daisy-chaining can overwrite them
module_name = self.module_name
module_args = self.module_args
for x in items: for x in items:
self.module_name = module_name
self.module_args = module_args
inject['item'] = x inject['item'] = x
result = self._executor_internal_inner(host, inject, port) result = self._executor_internal_inner(host, inject, port)
results.append(result.result) results.append(result.result)