mirror of
https://github.com/xcat2/confluent.git
synced 2026-11-20 17:32:21 +00:00
Enable ansible pipelining for plays by default
Without pipelining every task copies the module to the node over sftp, then makes it executable, runs it and removes it, each a separate ssh operation. With pipelining the module is fed to the interpreter over the ssh session, so a task takes one operation and nothing is written to the node's temporary directory. Pipelining breaks become through sudo with requiretty, which rarely applies here: plays connect as root and drop become unless become_user is set. Setting ANSIBLE_PIPELINING or ANSIBLE_SSH_PIPELINING still overrides this default.
This commit is contained in:
@@ -198,6 +198,9 @@ class PlayRunner(object):
|
||||
if 'serveraliveinterval' not in ansiblesshargs.lower():
|
||||
ansiblesshargs += ' -o ServerAliveInterval=15 -o ServerAliveCountMax=4'
|
||||
localenv['ANSIBLE_SSH_ARGS'] = ansiblesshargs
|
||||
# feed modules over the ssh session rather than copying them over first
|
||||
if 'ANSIBLE_PIPELINING' not in localenv and 'ANSIBLE_SSH_PIPELINING' not in localenv:
|
||||
localenv['ANSIBLE_PIPELINING'] = 'True'
|
||||
with feedback:
|
||||
for playfilename in self.playfiles:
|
||||
worker = await asyncio.create_subprocess_exec(
|
||||
|
||||
Reference in New Issue
Block a user