From a78bd6f443f2207e6ba8fa336046d6922a0e6dc8 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 22 Jan 2023 20:11:52 +0100 Subject: [PATCH] Fix check in SSH connection test (#567) * Fix check. * Adjust error check. --- .../targets/generic_ssh_connection/tasks/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/generic_ssh_connection/tasks/main.yml b/tests/integration/targets/generic_ssh_connection/tasks/main.yml index 74483e50..94554f71 100644 --- a/tests/integration/targets/generic_ssh_connection/tasks/main.yml +++ b/tests/integration/targets/generic_ssh_connection/tasks/main.yml @@ -58,9 +58,10 @@ - 'output.volumes is not defined' - 'output.images is not defined' - 'output.disk_usage is not defined' - when: output is succeeded or 'Install paramiko package to enable' in output.msg - # For whatever reason, even though paramiko is installed, *sometimes* this error - # shows up. I have no idea why it sometimes works and sometimes not... + when: output is succeeded or 'Failed to import the required Python library (paramiko)' not in output.msg + # Sometimes paramiko being installed isn't enough: importing it can fail + # due to 'ImportError: No module named x25519' when it executes + # `from cryptography.hazmat.primitives.asymmetric.x25519 import ...`. - name: Get docker daemon information via ssh (OpenSSH) to localhost docker_host_info: