From 2067804e9f0fab7c26905d6c117c1462756ccc59 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 12 Aug 2025 04:23:45 +0200 Subject: [PATCH] Solved ansible multiplexing auth bug --- ansible.cfg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index ab2d35ef..60f0edbd 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -19,9 +19,14 @@ lookup_plugins = ./lookup_plugins module_utils = ./module_utils [ssh_connection] -pipelining = True -scp_if_ssh = smart -ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=/tmp/ansible-ssh-%%h-%%p-%%r +# Multiplexing: safer socket path in HOME instead of /tmp +ssh_args = -o ControlMaster=auto -o ControlPersist=20s -o ControlPath=~/.ssh/ansible-%h-%p-%r \ + -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=accept-new \ + -o PreferredAuthentications=publickey,password,keyboard-interactive + +# Pipelining boosts speed; works fine if sudoers does not enforce "requiretty" +pipelining = True +scp_if_ssh = smart [persistent_connection] connect_timeout = 30