Skip to content

Ansible

overview

In this ansible collection we show how to use ansible to find all the available modules within an Arista EOS device using the capabilities method within gNMI.

Edit the inventory file to match your environment

[leaf]
127.0.0.1 ansible_user=admin ansible_password=admin

[all:vars]
ansible_user=admin
ansible_password=admin
ansible_become_pass=admin
ansible_python_interpreter=/usr/bin/python3
ansible_port=6030
ansible_connection=nokia.grpc.gnmi
ansible_gnmi_encoding=JSON

gNMI collection

ansible-galaxy collection install nokia.openconfig

Run the playbook

ansible-playbook -i inventory capabilities.yaml

output of playbook

ok: [10.20.30.67] => {
    "msg": {
        "gNMIVersion": "0.7.0",
        "supportedEncodings": [
            "JSON",
            "JSON_IETF",
            "ASCII"
        ],
        "supportedModels": [
            {
                "name": "arista-exp-eos-multicast",
                "organization": "Arista Networks <http://arista.com/>"
            },
            {
                "name": "arista-exp-eos-evpn",
                "organization": "Arista Networks, Inc."
            },