Skip to content

Commit

Permalink
Merge pull request #9973 from shanemcd/fix-adhoc-commands
Browse files Browse the repository at this point in the history
Fix issue where ad-hoc commands for multiple hosts ran on single host

Should resolve #9685

Reviewed-by: Matthew Jones <bsdmatburt@gmail.com>
  • Loading branch information
softwarefactory-project-zuul[bot] authored Apr 21, 2021
2 parents 5ef7dd8 + 7fd5a4e commit eec4f8d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions awx/main/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2753,14 +2753,6 @@ def build_env(self, ad_hoc_command, private_data_dir, isolated=False, private_da
env['ANSIBLE_LOAD_CALLBACK_PLUGINS'] = '1'
env['ANSIBLE_SFTP_BATCH_MODE'] = 'False'

# Create a directory for ControlPath sockets that is unique to each
# ad hoc command
cp_dir = os.path.join(private_data_dir, 'cp')
if not os.path.exists(cp_dir):
os.mkdir(cp_dir, 0o700)
# FIXME: more elegant way to manage this path in container
env['ANSIBLE_SSH_CONTROL_PATH'] = '/runner/cp'

return env

def build_args(self, ad_hoc_command, private_data_dir, passwords):
Expand Down

0 comments on commit eec4f8d

Please sign in to comment.