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
---
- hosts: your_hostsgather_facts: falsetasks:
- name: Default interfaces configios_config:
lines:
- default int range Gi0/1, Gi0/2
- name: Configure interfacesios_config:
lines:
- description New descriptionparents: "interface range Gi0/1, Gi0/2"
EXPECTED RESULTS
The above should not cause any traceback.
ACTUAL RESULTS
The full traceback is:
Traceback (most recent call last):
File "/home/xx/.ansible/tmp/ansible-local-174914kI5Nq/ansible-tmp-1721118244.83-17567-217273740546307/AnsiballZ_ios_config.py", line 102, in <module>
_ansiballz_main()
File "/home/xx/.ansible/tmp/ansible-local-174914kI5Nq/ansible-tmp-1721118244.83-17567-217273740546307/AnsiballZ_ios_config.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/xx/.ansible/tmp/ansible-local-174914kI5Nq/ansible-tmp-1721118244.83-17567-217273740546307/AnsiballZ_ios_config.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.network.ios.ios_config', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/modules/network/ios/ios_config.py", line 569, in <module>
File "/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/modules/network/ios/ios_config.py", line 500, in main
File "/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/modules/network/ios/ios_config.py", line 364, in edit_config_or_macro
File "/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/module_utils/connection.py", line 190, in __rpc__
ansible.module_utils.connection.ConnectionError: default int range Gi0/19, Gi0/20
default int range Gi0/19, Gi0/20
^
% Invalid input detected at '^' marker.
SW02(config)#
fatal: [SW02]: FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/home/xx/.ansible/tmp/ansible-local-174914kI5Nq/ansible-tmp-1721118244.83-17567-217273740546307/AnsiballZ_ios_config.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/xx/.ansible/tmp/ansible-local-174914kI5Nq/ansible-tmp-1721118244.83-17567-217273740546307/AnsiballZ_ios_config.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/xx/.ansible/tmp/ansible-local-174914kI5Nq/ansible-tmp-1721118244.83-17567-217273740546307/AnsiballZ_ios_config.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.ios.ios_config', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/modules/network/ios/ios_config.py\", line 569, in <module>\n File \"/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/modules/network/ios/ios_config.py\", line 500, in main\n File \"/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/modules/network/ios/ios_config.py\", line 364, in edit_config_or_macro\n File \"/tmp/ansible_ios_config_payload_bRAH6H/ansible_ios_config_payload.zip/ansible/module_utils/connection.py\", line 190, in __rpc__\nansible.module_utils.connection.ConnectionError: default int range Gi0/19, Gi0/20\r\ndefault int range Gi0/19, Gi0/20\r\n ^\r\n% Invalid input detected at '^' marker.\r\n\r\nmcigmy2-ostravank-29(config)#\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
The text was updated successfully, but these errors were encountered:
SUMMARY
ios_config module accepts format
interface range Gi0/1 - 2
but this valid IOS syntax causes traceback
interface range Gi0/1, Gi0/2
ISSUE TYPE
COMPONENT NAME
ios_config
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
The above should not cause any traceback.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: