diff --git a/changelogs/fragments/47096-junos-terminal-regex-fix.yml b/changelogs/fragments/47096-junos-terminal-regex-fix.yml new file mode 100644 index 00000000000..d4debca68c5 --- /dev/null +++ b/changelogs/fragments/47096-junos-terminal-regex-fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - junos - fix terminal prompt regex (https://github.com/ansible/ansible/pull/47096) diff --git a/lib/ansible/plugins/terminal/junos.py b/lib/ansible/plugins/terminal/junos.py index 63d1059025f..2878e1ec600 100644 --- a/lib/ansible/plugins/terminal/junos.py +++ b/lib/ansible/plugins/terminal/junos.py @@ -36,7 +36,7 @@ except ImportError: class TerminalModule(TerminalBase): terminal_stdout_re = [ - re.compile(br"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$|%"), + re.compile(br"[\r\n]?[\w@+\-\.:\/\[\]]+[>#%] ?$"), ] terminal_stderr_re = [