From c959ce010b123a19cbd65118c2a4bd7a8af3d3ef Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sat, 14 Mar 2020 23:09:40 -0700 Subject: [PATCH] created temp action obj for 'meta: reset_connection' python interpreter discovery --- ansible_mitogen/connection.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ansible_mitogen/connection.py b/ansible_mitogen/connection.py index 9c09b254..ccaba7dc 100644 --- a/ansible_mitogen/connection.py +++ b/ansible_mitogen/connection.py @@ -889,11 +889,17 @@ class Connection(ansible.plugins.connection.ConnectionBase): self.reset_compat_msg ) - # TODO # Strategy's _execute_meta doesn't have an action obj but we'll need one for # running interpreter_discovery - # self._action = ansible_mitogen.mixins.ActionModuleMixin - # import epdb; epdb.set_trace() + # will create a new temporary action obj for this purpose + self._action = ansible_mitogen.mixins.ActionModuleMixin( + task=0, + connection=self, + play_context=self._play_context, + loader=0, + templar=0, + shared_loader_obj=0 + ) # Clear out state in case we were ever connected. self.close()