# Viptela Support on Ansible

**URL:** <https://forum.ansible.com/t/viptela-support-on-ansible/27888>\
**Category:** Ansible Project\
**Created:** [June 27, 2018, 7:11pm UTC](https://forum.ansible.com/t/viptela-support-on-ansible/27888 "2018-06-27T19:11:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![j-16375](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@j-16375](https://forum.ansible.com/u/j-16375)\
**Post date:** [June 27, 2018, 7:11pm UTC](https://forum.ansible.com/t/viptela-support-on-ansible/27888/1 "2018-06-27T19:11:30Z")

</div>

Does anyone have any experience using Ansible with Viptela SD-WAN products (vEdge mostly)? The ios\_command module seems to work at a basic level for running simple commands but runs into issues with more complex commands.

For example, using Ansible 2.5.5 and running the following command against a vEdge-1000:

#show interface detail | display xml | nomore

Partial output is returned, but although the xml format appears correct when running command on the device, it appears to get mangled in the ansible output. What are the best ways to approach troubleshooting an issue like this?

Sample output:

ok: [HOSTNAME] =\> {  
“print\_output.stdout\_lines”: [  
[  
“”  
],  
[  
“\<config xmlns="[http://tail-f.com/ns/config/1.0\“\>”](http://tail-f.com/ns/config/1.0%5C%22%3E%22),  
" \<interface xmlns="[http://viptela.com/oper-vpn\“\>”](http://viptela.com/oper-vpn%5C%22%3E%22),  
" 0”,  
" ge0/0“,  
" ipv4”,  
" x.x.x.x/29“,  
" Up”,  
" Up“,  
" NA”,  
" WAN“,  
" ”,  
" 0“,  
" x.x.x.x/29”,  
" x.x.x.x“,  
" false”,  
" “,  
" null”,  
" transport“,  
" 1”,  
" 1500“,  
" 80:b7:b9:c7:28:13”,  
" 1000“,  
" full”,  
" true“,  
" tx\_pause rx\_pause”,  
" 1360“,  
" 16:04:48:50”,  
" dhcp dns icmp“,  
" 114578914”,  
" 34723478373“,  
" 0”,  
" 14697761“,  
" 110381996”,  
" 20019647115"  
], \<============== OUTPUT GETS CORRUPTED HERE  
[  
“0”,  
" 2“,  
" 258”,  
" 1255“,  
" 234”,  
" 441“,  
" 36925”,  
" 36935“,  
" 139781”,  
" 139204“,  
" 353520”,  
" 0“,  
" 0”  
]  
]  
}

---

<div class="post-metadata">

**Author:** ![Eugene\_Wong](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@Eugene\_Wong](https://forum.ansible.com/u/Eugene_Wong)\
**Post date:** [July 26, 2018, 12:47pm UTC](https://forum.ansible.com/t/viptela-support-on-ansible/27888/2 "2018-07-26T12:47:03Z")

</div>

Hi j-16375,

We are currently doing a POC with Viptela in the lab and I’ve written an Ansible Galaxy module for it.

Do you want to try that?

Installation is by these commands:

pip install viptela-python --upgrade --force  
ansible-galaxy install eugene\_ky\_wong.viptela\_ansible --force

To get the result you need the commands needed are:

- cd to the directory which ansible-galaxy installed to
- modify variables.yml file to change the ‘vManage\_server’ IP address and the ‘ip\_address’ of your vEdge, and modify vault.yml for your login credentials.
- run ‘ansible-playbook 4\_get\_interface\_stats.yml’

Do let me know how that goes!

Eugene

---

<div class="post-metadata">

**Author:** ![Mark\_Anthony\_Garcia](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@Mark\_Anthony\_Garcia](https://forum.ansible.com/u/Mark_Anthony_Garcia)\
**Post date:** [July 25, 2019, 12:45pm UTC](https://forum.ansible.com/t/viptela-support-on-ansible/27888/3 "2019-07-25T12:45:32Z")

</div>

Hi Eugine,

Great script.

I have had success using ansible uri module for API calls to attach / detach feature templates.

I have also a python script from cisco but I made my own via ansible for easier troubleshooting in the future and so that it would be human readable for my team.

Mark Garcia

---

<div class="post-metadata">

**Author:** ![Juraj\_Papic](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Juraj\_Papic](https://forum.ansible.com/u/Juraj_Papic)\
**Post date:** [August 1, 2019, 7:41pm UTC](https://forum.ansible.com/t/viptela-support-on-ansible/27888/4 "2019-08-01T19:41:00Z")

</div>

Hello,

How can I configure the playbooks to work with multi-tenant.

THanks.

---

<div class="post-metadata">

**Author:** ![psprygad](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@psprygad](https://forum.ansible.com/u/psprygad)\
**Post date:** [August 1, 2019, 8:32pm UTC](https://forum.ansible.com/t/viptela-support-on-ansible/27888/5 "2019-08-01T20:32:19Z")

</div>

[https://github.com/ciscodevnet/ansible-viptela](https://github.com/ciscodevnet/ansible-viptela)
