mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Merge pull request #6811 from wenottingham/ssh_aaaaaaarghs
Don't override ANSIBLE_SSH_ARGS for ad-hoc commands. Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
88f44cb185
@ -2737,9 +2737,12 @@ class RunAdHocCommand(BaseTask):
|
||||
env['ANSIBLE_LOAD_CALLBACK_PLUGINS'] = '1'
|
||||
env['ANSIBLE_SFTP_BATCH_MODE'] = 'False'
|
||||
|
||||
# Specify empty SSH args (should disable ControlPersist entirely for
|
||||
# ad hoc commands).
|
||||
env.setdefault('ANSIBLE_SSH_ARGS', '')
|
||||
# Create a directory for ControlPath sockets that is unique to each
|
||||
# ad hoc command and visible inside the proot environment (when enabled).
|
||||
cp_dir = os.path.join(private_data_dir, 'cp')
|
||||
if not os.path.exists(cp_dir):
|
||||
os.mkdir(cp_dir, 0o700)
|
||||
env['ANSIBLE_SSH_CONTROL_PATH'] = cp_dir
|
||||
|
||||
return env
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user