# ios\_config using before to set interface range on Cisco switch

**URL:** <https://forum.ansible.com/t/ios-config-using-before-to-set-interface-range-on-cisco-switch/28577>\
**Category:** Ansible Project\
**Created:** [September 14, 2018, 4:07pm UTC](https://forum.ansible.com/t/ios-config-using-before-to-set-interface-range-on-cisco-switch/28577 "2018-09-14T16:07:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Clatterbaugh](https://avatars.discourse-cdn.com/v4/letter/f/a698b9/32.png) [@Frank\_Clatterbaugh](https://forum.ansible.com/u/Frank_Clatterbaugh)\
**Post date:** [September 14, 2018, 4:07pm UTC](https://forum.ansible.com/t/ios-config-using-before-to-set-interface-range-on-cisco-switch/28577/1 "2018-09-14T16:07:47Z")

</div>

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?
