mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
fill in network ssh password protected keys
This commit is contained in:
parent
bb5aeb5cf1
commit
f5aed74503
@ -1119,6 +1119,18 @@ class RunJob(BaseTask):
|
||||
if value not in ('', 'ASK'):
|
||||
passwords[field] = value
|
||||
|
||||
'''
|
||||
Only 1 value can be provided for a unique prompt string. Prefer ssh
|
||||
key unlock over network key unlock.
|
||||
'''
|
||||
if 'ssh_key_unlock' not in passwords:
|
||||
for cred in job.network_credentials:
|
||||
if cred.inputs.get('ssh_key_unlock'):
|
||||
passwords['ssh_key_unlock'] = kwargs.get(
|
||||
'ssh_key_unlock',
|
||||
decrypt_field(cred, 'ssh_key_unlock')
|
||||
)
|
||||
|
||||
return passwords
|
||||
|
||||
def build_env(self, job, **kwargs):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user