Important Moderation Notice

This community is currently under full moderation, meaning all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you will receive an email outlining the reason(s). We have implemented full moderation to control spam. Thank you for your patience and participation.

Related Posts

Ansible Playbook to execute CLI commands

Hi communitydo you have an example of an..
Read More

https://github.com/versa-networks/devops

The GitHub repository named devops is m..
Read More

Inventory Collection using Python

Here is an example script from Versa Git..
Read More

Ansible Playbook to execute CLI commands

Hi community,

do you have an example of an ansible playbook which executes commands on a VOS device (CLI commands)?


thanks!

Maksym

Comments

  • Hi,

    You can pipe your cli command to /opt/versa/confd/bin/confd_cli on the VOS device.

    If you want to process the output, I suggest to use the display json, so you will have the output in json format.


    Here is an example ansible task how to use it:


       - name: "Get NTP status"

         ansible.builtin.shell:

           cmd: echo "show ntp statistics | display json" | /opt/versa/confd/bin/confd_cli

         register: output

    Maksym
Sign In or Register to comment.
/* */