mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 19:07:36 -02: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'):
|
if value not in ('', 'ASK'):
|
||||||
passwords[field] = value
|
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
|
return passwords
|
||||||
|
|
||||||
def build_env(self, job, **kwargs):
|
def build_env(self, job, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user