Ansible Playbook to execute CLI commands
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