mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 02:17:37 -02:30
@@ -394,7 +394,7 @@ class BaseTask(Task):
|
|||||||
# will be read then closed, instead of leaving the SSH key on disk.
|
# will be read then closed, instead of leaving the SSH key on disk.
|
||||||
if name in ('credential', 'network_credential', 'scm_credential', 'ad_hoc_credential') and not ssh_too_old:
|
if name in ('credential', 'network_credential', 'scm_credential', 'ad_hoc_credential') and not ssh_too_old:
|
||||||
path = os.path.join(kwargs.get('private_data_dir', tempfile.gettempdir()), name)
|
path = os.path.join(kwargs.get('private_data_dir', tempfile.gettempdir()), name)
|
||||||
self.open_fifo_write(path)
|
self.open_fifo_write(path, data)
|
||||||
else:
|
else:
|
||||||
handle, path = tempfile.mkstemp(dir=kwargs.get('private_data_dir', None))
|
handle, path = tempfile.mkstemp(dir=kwargs.get('private_data_dir', None))
|
||||||
f = os.fdopen(handle, 'w')
|
f = os.fdopen(handle, 'w')
|
||||||
@@ -404,7 +404,7 @@ class BaseTask(Task):
|
|||||||
private_data_files[name] = path
|
private_data_files[name] = path
|
||||||
return private_data_files
|
return private_data_files
|
||||||
|
|
||||||
def open_fifo_write(self, path):
|
def open_fifo_write(self, path, data):
|
||||||
'''open_fifo_write opens the fifo named pipe in a new thread.
|
'''open_fifo_write opens the fifo named pipe in a new thread.
|
||||||
This blocks until the the calls to ssh-agent/ssh-add have read the
|
This blocks until the the calls to ssh-agent/ssh-add have read the
|
||||||
credential information from the pipe.
|
credential information from the pipe.
|
||||||
|
|||||||
Reference in New Issue
Block a user