Showing results for 
Search instead for 
Did you mean: 

IOSXE Upgrade via Ansible

Cisco Employee
Cisco Employee

Hi DevNet Folks,

Following my NXOS upgrade playbook I shared last time; I have now created a playbook for IOSXE which has been tested against Cat9K and Cat8500. Thanks to Suresh Vina for testing against Cat9K.

I have used the following to build this playbook, which help some individuals to understand, how you can utilise these items in Ansible.

-      Ansible with PyATS Role.
-      Regex to find strings.
-      IOSXE Ansible Facts Module.
-      Ansible Block Rescue and Always.

What does this playbook cover?
-      Display current facts about the device in question.
-      Config Backup before starting the upgrade.
-      Assert that device is not running with the expected IOXE Version.
-      Assert that device has enough disk space to accommodate new image.
-      Assert that device disk has the new image.
-      Copy the image via SCP or FTP.
-      Verify the new image with given MD5 Hash.
-      Install/upgrade the IOSXE software upgrade with the new image.
-      Clean up old or unnecessary packages.

What does this playbook do not cover? So, you may need to create separate playbooks for that.
-      Any L2/L3 checks before or after the upgrade.

Here is the link for the repo. I am open with any suggestions.

Please also see the attached screenshots for this playbook run.

1 Reply 1


Thanks @murafi for sharing.

Best regards
******* If This Helps, Please Rate *******
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers