From 5ffb863f0bf4ccd27e1deab294ada25affb7eaff Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Mon, 3 Dec 2018 14:00:28 +0100 Subject: [PATCH] Fix regex on ASA password prompt (#49438) On Cisco ASAv on AWS, the prompt is 'Password', thus the privilege elevation fails, we need to check upper and lower p. --- lib/ansible/plugins/terminal/asa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/terminal/asa.py b/lib/ansible/plugins/terminal/asa.py index 781dcb7712..dbb75a1c28 100644 --- a/lib/ansible/plugins/terminal/asa.py +++ b/lib/ansible/plugins/terminal/asa.py @@ -58,7 +58,7 @@ class TerminalModule(TerminalBase): if passwd: # Note: python-3.5 cannot combine u"" and r"" together. Thus make # an r string and use to_text to ensure it's text on both py2 and py3. - cmd[u'prompt'] = to_text(r"[\r\n]?password: $", errors='surrogate_or_strict') + cmd[u'prompt'] = to_text(r"[\r\n]?[Pp]assword: $", errors='surrogate_or_strict') cmd[u'answer'] = passwd try: