Skip to content

oktospeaker/MikroTik-RouterOS-Update-Ansible

Repository files navigation

MikroTik-RouterOS-Update-Ansible

Updating MikroTik RouterOS Devices using Ansible (both CHR and RB)

What?

  • Updating RouterOS using Ansible

Where?

  • Tested on Ansible 2.9.1
  • RouterOS version not lower than 6.45 due to the use of sftp to transfer files

How?

  • Just start playbook RouterOS-Update.yml
  • Playbooks BackupRouterOS.yml, UpdateRouterOS-RB.yml, UpdateRouterOS-CHR.yml are needed for work

Warning!

  • I use ssh keys for authentication in example (and strictly recommend it)
  • Before using, check the RouterOS latest version and type it in RouterOS-Update.yml playbook in three places (strings № 7, 40, 46)

How does it work?

General Steps:

  1. Doing export and backup files of RouterOS
  2. Copying these files to "bk" folder
  3. Checking and Printing if it's CHR or RB
  4. Checking and Printing RouterOS Version (both CHR and RB)
  5. Updating CHR RouterOS, if needed (when current RouterOS version != {{ version }})
  6. Updating RB RouterOS + RB Firmware, if needed (when current RouterOS version != {{ version }})
  7. Checking and Printing RouterOS Version after Updating (both CHR and RB)
  8. Checking and Printing Firmware Version after Updating (refers to RB only)
  9. Some cleaning on every steps

Due to scripting (delays and pauses) durations of RB and CHR updating are 6 min 25 sec and 2 min 15 sec respectively

What to do?

  • Just enjoy!

About

MikroTik RouterOS Update using Ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published