diff --git a/changelogs/fragments/18-support-dashes-in-username.yml b/changelogs/fragments/18-support-dashes-in-username.yml new file mode 100644 index 00000000..afe389d1 --- /dev/null +++ b/changelogs/fragments/18-support-dashes-in-username.yml @@ -0,0 +1,3 @@ +minor_changes: + - command - added support for a dash (``-``) in username (https://github.com/ansible-collections/community.routeros/pull/18). + - facts - added support for a dash (``-``) in username (https://github.com/ansible-collections/community.routeros/pull/18). diff --git a/plugins/terminal/routeros.py b/plugins/terminal/routeros.py index 0221b98d..2c29d1db 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\]: ?"), ]