1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

add support for new "BECOME" prompt in Ansible 2.5+ for adhoc commands

see: https://github.com/ansible/ansible-tower/issues/7850
This commit is contained in:
Ryan Petrello 2018-02-13 14:26:27 -05:00
parent eda53eb548
commit 613d48cdbc
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -2242,6 +2242,7 @@ class RunAdHocCommand(BaseTask):
for method in PRIVILEGE_ESCALATION_METHODS:
d[re.compile(r'%s password.*:\s*?$' % (method[0]), re.M)] = 'become_password'
d[re.compile(r'%s password.*:\s*?$' % (method[0].upper()), re.M)] = 'become_password'
d[re.compile(r'BECOME password.*:\s*?$', re.M)] = 'become_password'
d[re.compile(r'SSH password:\s*?$', re.M)] = 'ssh_password'
d[re.compile(r'Password:\s*?$', re.M)] = 'ssh_password'
return d