From 46da05652a6e444323a0b8ae2f53654415555222 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Thu, 18 Sep 2025 14:06:33 +0800 Subject: [PATCH] fix: Fixed the issue where the final connection verification failed when the domain name contains . --- apps/libs/ansible/modules_utils/remote_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/libs/ansible/modules_utils/remote_client.py b/apps/libs/ansible/modules_utils/remote_client.py index 4a7d7960c..0cb4e3989 100644 --- a/apps/libs/ansible/modules_utils/remote_client.py +++ b/apps/libs/ansible/modules_utils/remote_client.py @@ -227,7 +227,7 @@ class SSHClient: gateway_args = self.module.params['gateway_args'] or '' pattern = ( r"(?:sshpass -p ([^ ]+))?\s*ssh -o Port=(\d+)\s+-o StrictHostKeyChecking=no\s+" - r"([\w@]+)@([\d.]+)\s+-W %h:%p -q(?: -i (.+))?'" + r"([^@\s]+)@([^\s]+)\s+-W %h:%p -q(?: -i ([^']+))?'" ) match = re.search(pattern, gateway_args) if not match: