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’)?