When trying to use the before command to set an interface range on a Cisco switch it errors if I have more than one range. Both of these commands work fine from CLI.
Example:
Works before: interface range twoGigabitEthernet 1/0/1-36
Doesn’t work before: interface range twoGigabitEthernet 1/0/1-36, TenGigabitEthernet 1/0/39-48
Error is:
fatal: [LIN-WLFG-9300-FM-01]: FAILED! => changed=false
module_stderr: |-
Traceback (most recent call last):
File “/tmp/ansible_0V2RB4/ansible_module_ios_config.py”, line 561, in
main()
File “/tmp/ansible_0V2RB4/ansible_module_ios_config.py”, line 490, in main
load_config(module, commands)
File “/tmp/ansible_0V2RB4/ansible_modlib.zip/ansible/module_utils/network/ios/ios.py”, line 168, in load_config
File “/tmp/ansible_0V2RB4/ansible_modlib.zip/ansible/module_utils/connection.py”, line 149, in rpc
ansible.module_utils.connection.ConnectionError: TenGigabitEthernet 1/0/39-48
^
% Invalid input detected at ‘^’ marker.
Switch(config-if-range)#
module_stdout: ‘’
msg: MODULE FAILURE
rc: 1
I’m not sure if this is a bug or a limitation. Does anyone have any insight?