From 9646369c3346895569ae3e1ab152303c27ede326 Mon Sep 17 00:00:00 2001 From: svliron <73510650+svliron@users.noreply.github.com> Date: Mon, 26 Oct 2020 20:10:16 -0700 Subject: [PATCH 1/2] Update routeros.py Adjust the terminal detection line to support forward slashes in device hostnames (connections fail without clear reason otherwise) --- plugins/terminal/routeros.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/terminal/routeros.py b/plugins/terminal/routeros.py index 78996f28..0221b98d 100644 --- a/plugins/terminal/routeros.py +++ b/plugins/terminal/routeros.py @@ -47,7 +47,7 @@ class TerminalModule(TerminalBase): terminal_stdout_re = [ re.compile(br"\x1b<"), - re.compile(br"\[[\w\.]+\@[\w\s\-\.]+\] ?> ?$"), + re.compile(br"\[[\w\.]+\@[\w\s\-\.\/]+\] ?> ?$"), re.compile(br"Please press \"Enter\" to continue!"), re.compile(br"Do you want to see the software license\? \[Y\/n\]: ?"), ] From e2cbd117da8379d786be527fabf033f017ac1846 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 8 Nov 2020 10:58:28 +0100 Subject: [PATCH 2/2] Add changelog fragment. --- changelogs/fragments/138-routeros-allow-slash.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/138-routeros-allow-slash.yml diff --git a/changelogs/fragments/138-routeros-allow-slash.yml b/changelogs/fragments/138-routeros-allow-slash.yml new file mode 100644 index 00000000..a28f7a46 --- /dev/null +++ b/changelogs/fragments/138-routeros-allow-slash.yml @@ -0,0 +1,2 @@ +bugfixes: +- "routeros terminal plugin - allow slashes in hostnames for terminal detection. Without this, slashes in hostnames will result in connection timeouts (https://github.com/ansible-collections/community.network/pull/138)."