You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running on RHEL 8 installed using DNF
Targeting Mikrotik RouterOS 6.48.2
STEPS TO REPRODUCE
set the router identity/hostname to a name of 19 char's or longer and run the play book with -v switch to see the return.
if you repeat the playbook against the same device but change the identity/hostname to a shorter name you'll get the expected result as can be seen in the output with -v
Expecting the current firmware version to be returned as is shown in the output below
ansible-playbook -v ./debug.yml
Using /home/markmcn/ansible-test/ansible.cfg as config file
PLAY [noc_x] *******************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************
ok: [dev-rt.i.domain.xx]
TASK [Check current firmware version] ******************************************************************************************************************************************************************************************************
ok: [dev-rt.i.domain.xx] => {"changed": false, "stdout": ["6.48.2"], "stdout_lines": [["6.48.2"]]}
PLAY RECAP *********************************************************************************************************************************************************************************************************************************
dev-rt.i.domain.xx : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
ACTUAL RESULTS
After collecting the expected result above I logged into the test device and changed the hostname/identity to ThisIsAReallyLongName and repeated the test. Notice how the stdout of the return now contains mangled copies of the ROS command issued. If you shorten the hostname under the 19 char limit the result goes back to being as expected.
ansible-playbook -v ./debug.yml
Using /home/markmcn/ansible-test/ansible.cfg as config file
PLAY [noc_x] *******************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************
ok: [dev-rt.i.domain.xx]
TASK [Check current firmware version] ******************************************************************************************************************************************************************************************************
ok: [dev-rt.i.domain.xx] => {"changed": false, "stdout": [":put [/system routerboard get current-firmware \n<ystem routerboard get current-firmware ] \n<ystem routerboard get current-firmware ]\n<ystem routerboard get current-firmware ]\n\n6.48.2"], "stdout_lines": [[":put [/system routerboard get current-firmware ", "<ystem routerboard get current-firmware ] ", "<ystem routerboard get current-firmware ]", "<ystem routerboard get current-firmware ]", "", "6.48.2"]]}
PLAY RECAP *********************************************************************************************************************************************************************************************************************************
dev-rt.i.domain.xx : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
The text was updated successfully, but these errors were encountered:
Hey @markmcn, 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:
SUMMARY
When the router has a name greater than or equal to 19 char's the return from routeros_command
ISSUE TYPE
COMPONENT NAME
routeros_command
command
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Running on RHEL 8 installed using DNF
Targeting Mikrotik RouterOS 6.48.2
STEPS TO REPRODUCE
set the router identity/hostname to a name of 19 char's or longer and run the play book with -v switch to see the return.
if you repeat the playbook against the same device but change the identity/hostname to a shorter name you'll get the expected result as can be seen in the output with -v
EXPECTED RESULTS
Expecting the current firmware version to be returned as is shown in the output below
ACTUAL RESULTS
After collecting the expected result above I logged into the test device and changed the hostname/identity to ThisIsAReallyLongName and repeated the test. Notice how the stdout of the return now contains mangled copies of the ROS command issued. If you shorten the hostname under the 19 char limit the result goes back to being as expected.
The text was updated successfully, but these errors were encountered: