From 6ac9168d55aed336e573476fc360403ea10605cb Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sun, 16 Aug 2020 00:43:41 -0700 Subject: [PATCH] need to get around sshpass check here somehow: https://github.com/ansible/ansible/blob/v2.10.0/lib/ansible/plugins/connection/ssh.py#L577 --- ansible_mitogen/process.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ansible_mitogen/process.py b/ansible_mitogen/process.py index 1fc7bf80..e690058b 100644 --- a/ansible_mitogen/process.py +++ b/ansible_mitogen/process.py @@ -59,6 +59,8 @@ import mitogen.utils import ansible import ansible.constants as C import ansible.errors +# required for mocking sshpass check on ansible's side +from ansible.plugins.connection import ssh import ansible_mitogen.logging import ansible_mitogen.services @@ -672,6 +674,12 @@ class MuxProcess(object): self._setup_master() self._setup_services() + # mock checking if sshpass exists; mitogen doesn't need it to ssh + # TODO: confirm this + # TODO TODO: this isn't working + ssh.SSHPASS_AVAILABLE = True + import epdb; epdb.set_trace() + try: # Let the parent know our listening socket is ready. mitogen.core.io_op(self.model.child_sock.send, b('1'))