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

Fix ios and iosxr terminal prompt regex (#39063)

Fixes #38732

Make matching leading newline for cli prompt
optional as there are cases when returned repsonse
for ios/iosx remote host doesn't have newline before
cli prompt.
This commit is contained in:
Ganesh Nalawade 2018-04-20 21:50:13 +05:30 committed by Chris Alfonso
parent afcc9ddf8c
commit eebfa66c2b
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ from ansible.plugins.terminal import TerminalBase
class TerminalModule(TerminalBase): class TerminalModule(TerminalBase):
terminal_stdout_re = [ terminal_stdout_re = [
re.compile(br"[\r\n][\w\+\-\.:\/\[\]]+(?:\([^\)]+\)){0,3}(?:[>#]) ?$") re.compile(br"[\r\n]?[\w\+\-\.:\/\[\]]+(?:\([^\)]+\)){0,3}(?:[>#]) ?$")
] ]
terminal_stderr_re = [ terminal_stderr_re = [

View file

@ -29,7 +29,7 @@ from ansible.errors import AnsibleConnectionFailure
class TerminalModule(TerminalBase): class TerminalModule(TerminalBase):
terminal_stdout_re = [ terminal_stdout_re = [
re.compile(br"[\r\n][\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), re.compile(br"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"),
re.compile(br']]>]]>[\r\n]?') re.compile(br']]>]]>[\r\n]?')
] ]