Ansible and IOSXE - RESTCONF

Introduction General preparation [all:vars] ansible_python_interpreter="/usr/bin/python3" ansible_network_os=default [iosxe] ios-xe-mgmt.cisco.com ansible_port=8181 group_vars ansible_user: 'developer' ansible_password: 'C1sco12345' ansible_connection: "httpapi" ansible_network_os: "restconf" ansible_httpapi_use_ssl: true ansible_httpapi_port: 9443 ansible_httpapi_validate_certs: false ansible_httpapi_restconf_root: "/restconf" Ansible RESTCONF: retrieve IETF interfaces --- - name: Restconf - GET hosts: iosxe connection: local tasks: - name: Get interfaces from IETF YANG model restconf_get: content: config output: json path: /data/ietf-interfaces:interfaces/interface=GigabitEthernet1 register: output - name: display all debug: var: output In case you want to retrieve all interface, use the following path path: /data/ietf-interfaces:interfaces

Ansible and IOSXE - IOS modules

Introduction In this blog post, we will use Ansible to interact with our IOS XE devices. Ansible has a very extensive set of Network Modules for various devices and vendors.