Closed likeuu-user closed 3 years ago
CC @heuels
@heuels I just found out I can transfer issues from community.network here, so in the future I'll just move the issue here instead of pinging you directly, since I think you get notifications for new issues here, right? :)
@felixfontein, yes thank you! That would be much more convenient for the both of us 🙂
Hey @likeuu-user, thank you for opening an issue. This actually is a very well-known problem and there are two ways to mitigate it. You can add +cet512w
to your username in the playbook to make RouterOS think that your terminal width is 512 columns:
---
example_routeros:
ansible_host: 192.168.88.1
ansible_user: admin+cet512w
ansible_ssh_pass: ''
ansible_network_os: routeros
ansible_connection: network_cli
Or you can use routeros_api
module, which uses RouterOS API and therefore does not face terminal-related issues.
Thank you @heuels. I solved it by the method I was taught.
Great! Glad I could be of help.
SUMMARY
If you specify a command that exceeds 60 characters, a part of the specified command is output.
ISSUE TYPE
COMPONENT NAME
community.network.routeros_command
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
cat /etc/system-release
CentOS Linux release 7.8.2003 (Core)
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
** abnormal pattern *** ok: [HAPAC202] => { "changed": false, "invocation": { "module_args": { "commands": [ "/interface bridge print detail without-paging" ], "interval": 1, "match": "all", "retries": 10, "wait_for": null } }, "stdout": [ "/interface bridge print detail without-pagin\n<ge print detail without-paging \n<ge print detail without-paging\n<ge print detail without-paging\n\nFlags: X - disabled, R - running \n 0 R ;;; defconf\n name=\"bridgeLocal\" mtu=auto actual-mtu=1500 l2mtu=1598 arp=enabled \n arp-timeout=auto mac-address=48:8F:5A:66:75:5A protocol-mode=rstp \n fast-forward=yes igmp-snooping=no auto-mac=no \n admin-mac=48:8F:5A:66:75:5A ageing-time=5m priority=0x8000 \n max-message-age=20s forward-delay=15s transmit-hold-count=6 \n vlan-filtering=no dhcp-snooping=no" ], "stdout_lines": [ [ "/interface bridge print detail without-pagin", "<ge print detail without-paging ", "<ge print detail without-paging", "<ge print detail without-paging", "", "Flags: X - disabled, R - running ", " 0 R ;;; defconf", " name=\"bridgeLocal\" mtu=auto actual-mtu=1500 l2mtu=1598 arp=enabled ", " arp-timeout=auto mac-address=48:8F:5A:66:75:5A protocol-mode=rstp ", " fast-forward=yes igmp-snooping=no auto-mac=no ", " admin-mac=48:8F:5A:66:75:5A ageing-time=5m priority=0x8000 ", " max-message-age=20s forward-delay=15s transmit-hold-count=6 ", " vlan-filtering=no dhcp-snooping=no" ] ] }
** normal pattern *** ok: [HAPAC202] => { "changed": false, "invocation": { "module_args": { "commands": [ "/interface bridge print detail without-paging" ], "interval": 1, "match": "all", "retries": 10, "wait_for": null } }, "stdout": [ "Flags: X - disabled, R - running \n 0 R ;;; defconf\n name=\"bridgeLocal\" mtu=auto actual-mtu=1500 l2mtu=1598 arp=enabled \n arp-timeout=auto mac-address=48:8F:5A:66:75:5A protocol-mode=rstp \n fast-forward=yes igmp-snooping=no auto-mac=no \n admin-mac=48:8F:5A:66:75:5A ageing-time=5m priority=0x8000 \n max-message-age=20s forward-delay=15s transmit-hold-count=6 \n vlan-filtering=no dhcp-snooping=no" ], "stdout_lines": [ [ "Flags: X - disabled, R - running ", " 0 R ;;; defconf", " name=\"bridgeLocal\" mtu=auto actual-mtu=1500 l2mtu=1598 arp=enabled ", " arp-timeout=auto mac-address=48:8F:5A:66:75:5A protocol-mode=rstp ", " fast-forward=yes igmp-snooping=no auto-mac=no ", " admin-mac=48:8F:5A:66:75:5A ageing-time=5m priority=0x8000 ", " max-message-age=20s forward-delay=15s transmit-hold-count=6 ", " vlan-filtering=no dhcp-snooping=no" ] ] }