# Please review and critique my script for IOS upgrade activity

**URL:** <https://forum.ansible.com/t/please-review-and-critique-my-script-for-ios-upgrade-activity/34634>\
**Category:** Ansible Project\
**Created:** [February 17, 2021, 11:17am UTC](https://forum.ansible.com/t/please-review-and-critique-my-script-for-ios-upgrade-activity/34634 "2021-02-17T11:17:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikram\_S](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@Vikram\_S](https://forum.ansible.com/u/Vikram_S)\
**Post date:** [February 17, 2021, 11:17am UTC](https://forum.ansible.com/t/please-review-and-critique-my-script-for-ios-upgrade-activity/34634/1 "2021-02-17T11:17:09Z")

</div>

Hi,

I have prepared a script for of IOS upgrade activity. Please review and give me your suggestions/scope for improvement, etc  
I have prepared the scirpt for pre-upgrade tasks only as of now.

[https://drive.google.com/file/d/17iSDtyTp48zIZPi41C-UXXdS3nXck6yY/view?usp=sharing](https://drive.google.com/file/d/17iSDtyTp48zIZPi41C-UXXdS3nXck6yY/view?usp=sharing)

PRE-UPGRADE TASKS:

1. Check the IOS version running on device currently. If necessry image is running, skip further steps

2. Assuming ios need to be upgraded, check if necessary image is already there in flash or not

3. If image is not present, check if sufficient space is available

4. Initiate copying of ios image

5. Ensure image has been successfully copied and do MD5 verification

6. Set boot statement

7. write to memory

IOS UPGRADE TASK:

1. Ensure boot statement is set

2. take backup

3. write memory

4. reload

5. wait for 30 minute and check if image has upgraded
