From 09c537cbddc4675dbd167874f06b5d97e5952aec Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Mon, 16 Sep 2024 00:32:29 +0100 Subject: [PATCH] WIP --- .../plugins/connection/mitogen_ssh.py | 21 +------ tests/ansible/integration/ssh/password.yml | 58 +++++++++---------- 2 files changed, 30 insertions(+), 49 deletions(-) diff --git a/ansible_mitogen/plugins/connection/mitogen_ssh.py b/ansible_mitogen/plugins/connection/mitogen_ssh.py index 75f2d42fb..a111a21d5 100644 --- a/ansible_mitogen/plugins/connection/mitogen_ssh.py +++ b/ansible_mitogen/plugins/connection/mitogen_ssh.py @@ -33,33 +33,14 @@ import sys DOCUMENTATION = """ + name: mitogen_ssh author: David Wilson - connection: mitogen_ssh short_description: Connect over SSH via Mitogen description: - This connects using an OpenSSH client controlled by the Mitogen for Ansible extension. It accepts every option the vanilla ssh plugin accepts. - version_added: "2.5" options: - ssh_args: - type: str - vars: - - name: ssh_args - - name: ansible_ssh_args - - name: ansible_mitogen_ssh_args - ssh_common_args: - type: str - vars: - - name: ssh_args - - name: ansible_ssh_common_args - - name: ansible_mitogen_ssh_common_args - ssh_extra_args: - type: str - vars: - - name: ssh_args - - name: ansible_ssh_extra_args - - name: ansible_mitogen_ssh_extra_args """ try: diff --git a/tests/ansible/integration/ssh/password.yml b/tests/ansible/integration/ssh/password.yml index 21ab6f15d..0a2107f2f 100644 --- a/tests/ansible/integration/ssh/password.yml +++ b/tests/ansible/integration/ssh/password.yml @@ -16,11 +16,11 @@ ansible_ssh_pass: user1_password ping: - - meta: reset_connection - - name: ansible_ssh_password - vars: - ansible_ssh_password: user1_password - ping: + # - meta: reset_connection + # - name: ansible_ssh_password + # vars: + # ansible_ssh_password: user1_password + # ping: - meta: reset_connection - name: absent password should fail @@ -41,28 +41,28 @@ ansible_password: wrong ansible_ssh_pass: user1_password - - meta: reset_connection - - name: Highest priority password variable should override all others - vars: - ansible_password: wrong - ansible_ssh_pass: wrong - ansible_ssh_password: user1_password - ping: + # - meta: reset_connection + # - name: Highest priority password variable should override all others + # vars: + # ansible_password: wrong + # ansible_ssh_pass: wrong + # ansible_ssh_password: user1_password + # ping: - # Tests that ansible_ssh_password has priority over others - # and that a wrong password causes a target to be marked unreachable. - - meta: reset_connection - - name: Lower priority password variables should not override - vars: - ansible_password: user1_password - ansible_ssh_pass: user1_password - ansible_ssh_password: wrong - ping: - ignore_errors: true - ignore_unreachable: true - register: ssh_wrong_password_result - - assert: - that: - - ssh_wrong_password_result.unreachable == True - fail_msg: | - ssh_wrong_password_result={{ ssh_wrong_password_result }} + # # Tests that ansible_ssh_password has priority over others + # # and that a wrong password causes a target to be marked unreachable. + # - meta: reset_connection + # - name: Lower priority password variables should not override + # vars: + # ansible_password: user1_password + # ansible_ssh_pass: user1_password + # ansible_ssh_password: wrong + # ping: + # ignore_errors: true + # ignore_unreachable: true + # register: ssh_wrong_password_result + # - assert: + # that: + # - ssh_wrong_password_result.unreachable == True + # fail_msg: | + # ssh_wrong_password_result={{ ssh_wrong_password_result }}