From 0e03b079395345b2f36693a51d7d514d1ee77438 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Fri, 30 Oct 2026 18:42:48 +0100 Subject: [PATCH] Use ssh keepalives for ansible plays A node reset during a play left ssh waiting forever, which blocked every later remote configuration of that node, like an install's post.d. --- confluent_server/confluent/runansible.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_server/confluent/runansible.py b/confluent_server/confluent/runansible.py index 1cc3cb4e..8a75375e 100644 --- a/confluent_server/confluent/runansible.py +++ b/confluent_server/confluent/runansible.py @@ -134,6 +134,9 @@ class PlayRunner(object): ansiblesshargs = os.environ.get('ANSIBLE_SSH_ARGS', '') if 'hostbasedkeytypes' not in ansiblesshargs.lower() and 'hostbasedacceptedalgorithms' not in ansiblesshargs.lower(): ansiblesshargs += ' -o HostbasedAcceptedAlgorithms=*ed25519*' + # notice a node that was reset mid play, else ssh waits forever + if 'serveraliveinterval' not in ansiblesshargs.lower(): + ansiblesshargs += ' -o ServerAliveInterval=15 -o ServerAliveCountMax=4' localenv['ANSIBLE_SSH_ARGS'] = ansiblesshargs with feedback: for playfilename in self.playfiles: