1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Adding new stdout regex to allow local password changes. Adding stderr regex to catch more errors. (#30994)

This commit is contained in:
James Mighion 2017-09-27 21:35:14 -07:00 committed by Ganesh Nalawade
parent 9f5cba84b8
commit 2837200aea

View file

@ -30,11 +30,14 @@ from ansible.plugins.terminal import TerminalBase
class TerminalModule(TerminalBase): class TerminalModule(TerminalBase):
terminal_stdout_re = [ terminal_stdout_re = [
re.compile(br"[\r\n]?[\w]*\(.+\) ?#(?:\s*)$") re.compile(br"[\r\n]?[\w]*\(.+\) ?#(?:\s*)$"),
re.compile(br"[pP]assword:$")
] ]
terminal_stderr_re = [ terminal_stderr_re = [
re.compile(br"% ?Error"), re.compile(br"% ?Error"),
re.compile(br"Error:", re.M),
re.compile(br"^% \w+", re.M),
re.compile(br"% ?Bad secret"), re.compile(br"% ?Bad secret"),
re.compile(br"invalid input", re.I), re.compile(br"invalid input", re.I),
re.compile(br"(?:incomplete|ambiguous) command", re.I), re.compile(br"(?:incomplete|ambiguous) command", re.I),