Create new instance of the action plugin per until iteration. Fixes #57886 (#58022)

pull/58125/head
Matt Martz 5 years ago committed by GitHub
parent 375ac76e58
commit ffd117132f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
bugfixes:
- TaskExecutor - Create new instance of the action plugin on each
iteration when using until (https://github.com/ansible/ansible/issues/57886)

@ -729,6 +729,7 @@ class TaskExecutor:
display.debug('Retrying task, attempt %d of %d' % (attempt, retries))
self._final_q.put(TaskResult(self._host.name, self._task._uuid, result, task_fields=self._task.dump_attrs()), block=False)
time.sleep(delay)
self._handler = self._get_action_handler(connection=self._connection, templar=templar)
else:
if retries > 1:
# we ran out of attempts, so mark the result as failed

Loading…
Cancel
Save