# cisco.ios help

**URL:** <https://forum.ansible.com/t/cisco-ios-help/33394>\
**Category:** Ansible Project\
**Created:** [July 14, 2020, 5:26pm UTC](https://forum.ansible.com/t/cisco-ios-help/33394 "2020-07-14T17:26:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![william.dossett](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Post date:** [July 14, 2020, 5:26pm UTC](https://forum.ansible.com/t/cisco-ios-help/33394/1 "2020-07-14T17:26:00Z")

</div>

Hi,

I am writing a ansible pb to demonstrate the power of ansible to our NetOps team.

I know enough about ansible and cisco switches to get around, but I am stuck on something probably really simple.

I am trying to create a vlan and populate it with some interfaces, but I

`

- name: create vlan 10  
ios\_vlan:  
name: Vlan\_10  
vlan\_id: 10  
state: present

`

and I get

`  
“msg”: “configure terminal\r\n ^\r\n% Invalid input detected at ‘^’ marker.\r\n\r\nterrapin-2960-bu\>”,

`

and from the looks of the terrapin-2960-bu\> prompt it is not at enable mode which would be why it is invalid input…

I guess I don’t know how to get to enable mode in ansible cisco.ios and I can’t seem to find any reference that enlightens.

Regards  
BIll

---

<div class="post-metadata">

**Author:** ![ganeshrn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ganeshrn/32/1021_2.png) [@ganeshrn](https://forum.ansible.com/u/ganeshrn)\
**Post date:** [July 14, 2020, 5:33pm UTC](https://forum.ansible.com/t/cisco-ios-help/33394/2 "2020-07-14T17:33:47Z")

</div>

Most likely the error is due to missing privilege escalation.  
Refer [https://docs.ansible.com/ansible/latest/network/user\_guide/platform\_ios.html#using-cli-in-ansible](https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html#using-cli-in-ansible) for adding  
ansible\_become and ansible\_become\_password settings.

Also, FYI ios\_vlan module is deprecated, instead use [ios\_vlans](https://docs.ansible.com/ansible/latest/modules/ios_vlans_module.html) resource module (available in Ansible 2.9 version)

---

<div class="post-metadata">

**Author:** ![william.dossett](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Post date:** [July 14, 2020, 6:13pm UTC](https://forum.ansible.com/t/cisco-ios-help/33394/3 "2020-07-14T18:13:04Z")

</div>

Thanks Ganesh, I just found the privilege escalation once I formed my search correctly…

I am using the deprecated version for now as it seems there is an issue with creating vlans using ios\_vlans that I found on github which is not present in ios\_vlan - I plan to move code to ios\_vlans when that issue is resolved.

Thanks for your advice, appreciate it.
