2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-29 05:42:19 +00:00

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.
This commit is contained in:
Markus Hilger
2026-10-30 18:42:48 +01:00
parent 57a4659d59
commit 0e03b07939
+3
View File
@@ -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: