From bb4b98a82e8cc270a0a2fab422c45601b294237f Mon Sep 17 00:00:00 2001 From: James Mighion Date: Thu, 19 Oct 2017 16:52:14 -0700 Subject: [PATCH] Adds regex for stdout needed for changing root password and regex for stderr catching problems with the password. (#31955) --- lib/ansible/plugins/terminal/bigip.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/terminal/bigip.py b/lib/ansible/plugins/terminal/bigip.py index 0da27fda41a..9093d7bcc74 100644 --- a/lib/ansible/plugins/terminal/bigip.py +++ b/lib/ansible/plugins/terminal/bigip.py @@ -30,7 +30,8 @@ class TerminalModule(TerminalBase): terminal_stdout_re = [ re.compile(br"[\r\n]?(?:\([^\)]+\)){,5}(?:>|#) ?$"), re.compile(br"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), - re.compile(br"\[\w+\@[\w\-\.]+(?: [^\]])\] ?[>#\$] ?$") + re.compile(br"\[\w+\@[\w\-\.]+(?: [^\]])\] ?[>#\$] ?$"), + re.compile(br"(?:new|confirm) password:") ] terminal_stderr_re = [ @@ -40,6 +41,7 @@ class TerminalModule(TerminalBase): re.compile(br"invalid input", re.I), re.compile(br"(?:incomplete|ambiguous) command", re.I), re.compile(br"connection timed out", re.I), + re.compile(br"the new password was not confirmed", re.I), re.compile(br"[^\r\n]+ not found", re.I), re.compile(br"'[^']' +returned error code: ?\d+"), re.compile(br"[^\r\n]\/bin\/(?:ba)?sh")