Developer

 View Only
last person joined: 5 days ago 

Expand all | Collapse all

6400, Ansible: How to write running-config to startup-config using REST API?

This thread has been viewed 19 times
  • 1.  6400, Ansible: How to write running-config to startup-config using REST API?

    Posted Oct 20, 2022 11:57 AM
    I am using ansible with the aosxc collection to generate and copy a running-configuration unto my switches. This is going fine. Unfortunately, I cannot seem to find the command/configuration that I can put into my playbook so the switch will copy the new running-configuration into the startup-configuration. All I can find are the modules aosxc_command and aosxc_config, both of which seem to require an SSH connection into the switch.

    Is there a way to trigger a copy of the currently active running-configuration into the startup-configuration by way of ansible using the REST API of the switches?

    Thanks in advance, alex.


  • 2.  RE: 6400, Ansible: How to write running-config to startup-config using REST API?
    Best Answer

    Posted Oct 20, 2022 05:10 PM
    Hi Alex (@herr) ! 

    We have our aoscx_checkpoint module that allows you to copy a checkpoint to another - including running to startup!

    Here's an example:
    - name: Copy running-config to startup-config
      aoscx_checkpoint:
        source_config: "running-config"
        destination_config: "startup-config"


    We do have a known issue with this module at the moment but we're working on publishing a fix soon! For instructions on how to use the AOS-CX Ansible Collection and the REST API modules, refer to this guide on our DevHub!


  • 3.  RE: 6400, Ansible: How to write running-config to startup-config using REST API?

    Posted Oct 21, 2022 02:19 AM
    Ahhh, the checkpoint module. Yes, I am running into the same bug that you linked to, but other than that it's working. Thanks for the reply!


  • 4.  RE: 6400, Ansible: How to write running-config to startup-config using REST API?

    Posted Oct 24, 2022 06:51 PM
    Hello @herr !

    We've officially published the release of v4.1.1 of the AOS-CX Ansible collection, the fix for this issue as well as others were a part of the release so please install the latest version of the collection and our Python SDK using the commands below:
    ansible-galaxy collection install arubanetworks.aoscx -f
    pip3 install pyaoscx --upgrade

    Please let us know if you discover any further issues or unwanted behavior and thank you again for your patience!​


  • 5.  RE: 6400, Ansible: How to write running-config to startup-config using REST API?

    Posted Oct 27, 2022 03:06 AM
    Hi @Tiffany.Chiapuzio-Wong this worked great! Thanks for getting back to me.