david_igou.routeros_configuration.reboot role – Reboot or shut down a RouterOS device.
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.reboot.
Entry point main – Reboot or shut down a RouterOS device.
Synopsis
Reboots and waits for the API, or (gated) shuts the device down.
Parameters
Parameter |
Comments |
|---|---|
API hostname/IP of the device. Default: |
|
API password. Secret — supply via vault. |
|
TCP port; empty lets the module choose from tls. Default: |
|
Use TLS (api-ssl). Choices:
|
|
API username. Default: |
|
Validate the device TLS certificate. Choices:
|
|
Reboot the device and wait for the API to return. Choices:
|
|
Seconds to wait for the API after the reboot. Default: |
|
Shut down the device instead (gated; no reconnect wait). Choices:
|
Examples
# Reboot and wait for the API to return (the default).
- hosts: routers
gather_facts: false
roles:
- role: david_igou.routeros_configuration.reboot
# Reboot with a longer reconnect wait for a slow device.
- hosts: routers
gather_facts: false
roles:
- role: david_igou.routeros_configuration.reboot
vars:
routeros_reboot_timeout: 600
# Shut the device down instead of rebooting (no reconnect wait; gated).
- hosts: routers
gather_facts: false
roles:
- role: david_igou.routeros_configuration.reboot
vars:
routeros_reboot: false
routeros_shutdown: true