mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
fill in network ssh password protected keys
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user