Skip to content

Commit

Permalink
Update routeros.py (#138) (#9)
Browse files Browse the repository at this point in the history
* Update routeros.py

Adjust the terminal detection line to support forward slashes in device hostnames (connections fail without clear reason otherwise)

* Add changelog fragment.

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 3f3e0d0)

Fore-ported from ansible-collections/community.network#138.
  • Loading branch information
felixfontein authored Nov 9, 2020
1 parent 70208c0 commit 49ca4c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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)."
2 changes: 1 addition & 1 deletion plugins/terminal/routeros.py
Original file line number Diff line number Diff line change
Expand Up @@ -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\]: ?"),
]
Expand Down

0 comments on commit 49ca4c0

Please sign in to comment.