ansible_mitogen: Fix templated python interpreter with `meta: reset_connection`

refs #1079
This commit is contained in:
Alex Willmer 2024-12-10 16:15:06 +00:00
parent 941da31735
commit 6900e88dfd
3 changed files with 17 additions and 3 deletions

View File

@ -948,11 +948,11 @@ class Connection(ansible.plugins.connection.ConnectionBase):
# have an action object, which we need for interpreter_discovery.
# Create a temporary action object for this purpose.
self._action = ansible_mitogen.mixins.ActionModuleMixin(
task=0,
task=task,
connection=self,
play_context=self._play_context,
loader=0,
templar=0,
loader=templar._loader,
templar=templar,
shared_loader_obj=0,
)
self._action_monkey_patched_by_mitogen = True

View File

@ -23,6 +23,8 @@ In progress (unreleased)
* :gh:issue:`1079` :mod:`ansible_mitogen`: Fix :ans:mod:`wait_for_connection`
timeout with templated ``ansible_python_interpreter``
* :gh:issue:`1079` :mod:`ansible_mitogen`: Fix templated python interpreter
with `meta: reset_connection`
v0.3.19 (2024-12-02)

View File

@ -8,3 +8,15 @@
tags:
- issue_1079
- wait_for_connection
- hosts: issue1079
gather_facts: false
tasks:
- meta: reset_connection
- name: Wait for connection after reset_connection
wait_for_connection:
timeout: 5
tags:
- issue_1079
- reset_connection
- wait_for_connection