david_igou.routeros_configuration.upgrade role – Manage RouterOS package updates over the API.
Note
This role is part of the david_igou.routeros_configuration collection (version 0.0.8-alpha).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it use: ansible-galaxy collection install david_igou.routeros_configuration.
To use it in a playbook, specify: david_igou.routeros_configuration.upgrade.
Entry point main – Manage RouterOS package updates over the API.
Synopsis
Sets the package update channel (idempotently) and checks for updates.
Optionally installs an available update, which reboots the device — gated behind
routeros_upgrade_installand only when an update is available.
Parameters
Parameter |
Comments |
|---|---|
API hostname/IP of the device. Default: |
|
API password. Secret — supply via vault. The module marks it no_log. |
|
TCP port; empty lets the module choose from tls. Default: |
|
Use TLS (api-ssl). Choices:
|
|
API username. Default: |
|
Validate the device TLS certificate. Choices:
|
|
Upgrade RouterBOARD firmware and reboot. Gated; not applicable to CHR. Choices:
|
|
RouterOS package update channel. Choices:
|
|
Install an available update. REBOOTS the device. Choices:
|
|
Seconds to wait for the API to return after an install/reboot. Default: |
Examples
# Set the update channel only (install gated off by default; never reboots).
- hosts: routers
gather_facts: false
roles:
- role: david_igou.routeros_configuration.upgrade
vars:
routeros_update_channel: long-term
# Install an available update (REBOOTS the device; waits for the API).
- hosts: routers
gather_facts: false
roles:
- role: david_igou.routeros_configuration.upgrade
vars:
routeros_update_channel: stable
routeros_upgrade_install: true
routeros_upgrade_reboot_timeout: 600
# Upgrade RouterBOARD bootloader firmware and reboot (gated; not on a CHR).
- hosts: routers
gather_facts: false
roles:
- role: david_igou.routeros_configuration.upgrade
vars:
routeros_routerboard_upgrade: true