# vyos\_config question

**URL:** <https://forum.ansible.com/t/vyos-config-question/22976>\
**Category:** Ansible Project\
**Created:** [November 7, 2016, 7:55pm UTC](https://forum.ansible.com/t/vyos-config-question/22976 "2016-11-07T19:55:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl\_Betts](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@Carl\_Betts](https://forum.ansible.com/u/Carl_Betts)\
**Post date:** [November 7, 2016, 7:55pm UTC](https://forum.ansible.com/t/vyos-config-question/22976/1 "2016-11-07T19:55:15Z")

</div>

Have been trying to get the vyos\_config module to work ([https://docs.ansible.com/ansible/vyos\_config\_module.html](https://docs.ansible.com/ansible/vyos_config_module.html)).

However always getting this error: fatal: [localhost]: FAILED! =\> {“changed”: false, “commands”: [“show configuration commands”], “failed”: true, “msg”: “timeout trying to send command: show configuration commands\r”}

Playbook looks like this

---

<div class="post-metadata">

**Author:** ![Carl\_Betts](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@Carl\_Betts](https://forum.ansible.com/u/Carl_Betts)\
**Post date:** [November 17, 2016, 3:17pm UTC](https://forum.ansible.com/t/vyos-config-question/22976/2 "2016-11-17T15:17:23Z")

</div>

Just to update this. When it ssh’s in from the playbook it appears to only run this command.

1001 10471 10449 0 15:16 pts/1 00:00:00 -vbash

1001 10472 10449 1 15:16 pts/1 00:00:00 less --buffers=64 --auto-buffers --no-lessopen --QUIT-AT-EOF --quit-if-one-screen --RAW-CONTROL-CHARS --squeeze-blank-lines --no-init

1001 10473 10471 95 15:16 pts/1 00:00:00 cli-shell-api showConfig --show-active-only --show-commands

The cli-shell-api command does print the output when run manually.

---

<div class="post-metadata">

**Author:** ![Alexander\_H\_Laughlin](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Alexander\_H\_Laughlin](https://forum.ansible.com/u/Alexander_H_Laughlin)\
**Post date:** [November 19, 2016, 3:08am UTC](https://forum.ansible.com/t/vyos-config-question/22976/3 "2016-11-19T03:08:07Z")

</div>

`

- name: Configure remote device.

vyos\_config:

lines:

- set service snmp community testing authorization ro

provider: “{{ cli }}”

`

This works exactly as intended when I try it running Ansible 2.2 from a CentOS control machine to a VyOS 1.1.17 node that was installed with the live cd downloaded from the VyOS website on to a Debian Jessie VM running in VirtualBox.

It’s not clear from your post, but are you running ansible on the VyOS machine itself? It seems like that’s the case since the connection is being set to local and the hosts lists is localhost. If that is the case, while I am far too ignorant to know exactly _why_ it wouldn’t work, it _feels_ like something that would be dodgy at best if not explicitly prohibited. Possibly because VyOS is based on mostly deprecated by this point packages on a distribution (Debian Squeeze) that is known for being rock solid stable but extremely slow to release software updates.

Is there a reason that you’d be running Ansible locally as opposed to from a control machine? If so, would you be so kind as to let us know what version of Ansible you’re running along with the full output of the current VyOS config (‘show configuration’)?

Thanks!

---

<div class="post-metadata">

**Author:** ![Carl\_Betts](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@Carl\_Betts](https://forum.ansible.com/u/Carl_Betts)\
**Post date:** [November 21, 2016, 10:34pm UTC](https://forum.ansible.com/t/vyos-config-question/22976/4 "2016-11-21T22:34:27Z")

</div>

Thanks for the reply. I am running Ansible 2.2 from an Ubuntu machine. Maybe I am just not understanding the vyos\_config correctly.

If I change the localhost (ubuntu machine) to the hostname of the vyos machine I get this error:

`"msg": "paramiko is required but does not appear to be installed. It can be installed using`pip install paramiko` `

I assumed it had to be run with localhost so the vyos\_config parameters would be the remote hostname/ip of the vyos machine.

Could you post your playbook that you used that worked for you?

Thank you.

---

<div class="post-metadata">

**Author:** ![Alexander\_H\_Laughlin](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Alexander\_H\_Laughlin](https://forum.ansible.com/u/Alexander_H_Laughlin)\
**Post date:** [November 22, 2016, 4:40am UTC](https://forum.ansible.com/t/vyos-config-question/22976/5 "2016-11-22T04:40:07Z")

</div>

You’re quite welcome. You have run into an error which I also had while setting up vms I used to test this for you.

The playbook in its entirety is pasted below:

`
