david_igou.routeros_configuration._wait_api role – Wait for a RouterOS device to come back after a reboot.

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._wait_api.

Entry point main – Wait for a RouterOS device to come back after a reboot.

Synopsis

  • Internal helper role. The reboot, reset, restore and upgrade roles include it after issuing a reboot-class command instead of carrying their own copies of the wait logic.

  • Waits for the API TCP port to open, then retries a real API call until the login subsystem answers (the port accepts TCP before logins work).

Parameters

Parameter

Comments

_wait_api_delay

integer

Seconds to hold off before the first port probe, giving the device time to actually drop the port after the reboot command.

Default: 15

_wait_api_login_delay

integer

Seconds between login probes. Together with _wait_api_login_retries this bounds the login-phase budget.

Default: 5

_wait_api_login_retries

integer

How many times to retry the post-port login probe.

Default: 40

_wait_api_timeout

integer

Seconds to wait for the API TCP port to open. Callers pass their role’s *_reboot_timeout here.

Default: 120

routeros_api_hostname

string

API hostname/IP of the device.

Default: "{{ inventory_hostname }}"

routeros_api_password

string

API password. Secret — supply via vault/group_vars. Intentionally has no default so a missing value fails loudly rather than attempting an empty-password login. The module marks it no_log.

routeros_api_port

any

TCP port; empty lets the module choose from tls.

Default: ""

routeros_api_tls

boolean

Use TLS (api-ssl). Prefer true in production.

Choices:

  • false

  • true ← (default)

routeros_api_username

string

API username.

Default: "admin"

routeros_api_validate_certs

boolean

Validate the device TLS certificate.

Choices:

  • false

  • true ← (default)