The AOS-CX Developer Hub

Welcome to the AOS-CX developer hub. You'll find comprehensive guides and documentation to help you start working with AOS-CX as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

NAPALM with Ansible

NAPALM has integration with Ansible through the use of the napalm-ansible library. This library allows for Ansible playbooks to use NAPALM to retrieve data or modify configurations for networking devices as a collection of Ansible modules.

A great source for installation and configuration instructions for Ansible with AOS-CX can be found here.
Installation and configuration instructions for the NAPALM with Ansible integration can be found in the napalm-ansible Github here

Supported Functions in napalm-ansible for AOS-CX

  • napalm_get_facts
  • napalm_ping
  • napalm_validate



# Must match Python that NAPALM is installed into.
# Although specifying 'network_cli', NAPALM module will use AOS-CX REST
- name: NAPALM get_facts and get_interfaces
  hosts: aoscx1
  gather_facts: False
    - name: napalm get_facts
        filter: facts,interfaces

    - debug:
        var: napalm_facts
$ ansible-playbook napalm_get_aoscx.yml

PLAY [NAPALM get_facts and get_interfaces] *********

TASK [napalm get_facts] ****************************
ok: [aoscx1]

TASK [debug] ***************************************
ok: [aoscx1] => {
    "napalm_facts": {
        "fqdn": "aoscx1",
        "hostname": "aoscx1",
        "interface_list": [
        "model": "JL666A 6300F 24G CL4 PoE 4SFP56 Sw",
        "os_version": "FL.10.05.0001BH",
        "serial_number": "",
        "uptime": 12893402,
        "vendor": "Aruba"

PLAY RECAP ****************************************
aoscx1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0   

Updated 8 months ago

NAPALM with Ansible

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.