|
|
@ -28,23 +28,23 @@ from ansible.errors import AnsibleConnectionFailure
|
|
|
|
class TerminalModule(TerminalBase):
|
|
|
|
class TerminalModule(TerminalBase):
|
|
|
|
|
|
|
|
|
|
|
|
terminal_stdout_re = [
|
|
|
|
terminal_stdout_re = [
|
|
|
|
re.compile(r'[\r\n]?<.+>(?:\s*)$'),
|
|
|
|
re.compile(br'[\r\n]?<.+>(?:\s*)$'),
|
|
|
|
re.compile(r'[\r\n]?\[.+\](?:\s*)$'),
|
|
|
|
re.compile(br'[\r\n]?\[.+\](?:\s*)$'),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
terminal_stderr_re = [
|
|
|
|
terminal_stderr_re = [
|
|
|
|
re.compile(r"% ?Error: "),
|
|
|
|
re.compile(br"% ?Error: "),
|
|
|
|
re.compile(r"^% \w+", re.M),
|
|
|
|
re.compile(br"^% \w+", re.M),
|
|
|
|
re.compile(r"% ?Bad secret"),
|
|
|
|
re.compile(br"% ?Bad secret"),
|
|
|
|
re.compile(r"invalid input", re.I),
|
|
|
|
re.compile(br"invalid input", re.I),
|
|
|
|
re.compile(r"(?:incomplete|ambiguous) command", re.I),
|
|
|
|
re.compile(br"(?:incomplete|ambiguous) command", re.I),
|
|
|
|
re.compile(r"connection timed out", re.I),
|
|
|
|
re.compile(br"connection timed out", re.I),
|
|
|
|
re.compile(r"[^\r\n]+ not found", re.I),
|
|
|
|
re.compile(br"[^\r\n]+ not found", re.I),
|
|
|
|
re.compile(r"'[^']' +returned error code: ?\d+"),
|
|
|
|
re.compile(br"'[^']' +returned error code: ?\d+"),
|
|
|
|
re.compile(r"syntax error"),
|
|
|
|
re.compile(br"syntax error"),
|
|
|
|
re.compile(r"unknown command"),
|
|
|
|
re.compile(br"unknown command"),
|
|
|
|
re.compile(r"Error\[\d+\]: ", re.I),
|
|
|
|
re.compile(br"Error\[\d+\]: ", re.I),
|
|
|
|
re.compile(r"Error:", re.I)
|
|
|
|
re.compile(br"Error:", re.I)
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def on_open_shell(self):
|
|
|
|
def on_open_shell(self):
|
|
|
|