stephrobert.scaleway.rolling_reboot role – Reboot a named inventory group in batches

Note

This role is part of the stephrobert.scaleway collection (version 0.8.0).

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 stephrobert.scaleway.

To use it in a playbook, specify: stephrobert.scaleway.rolling_reboot.

Entry point main – Reboot a named inventory group in batches

Synopsis

  • Reboots one batch at a time and waits for each batch to come back before touching the next. A machine that is not running is left alone and named: a rolling reboot that starts machines has done something nobody asked for.

  • The waiting is observation, never a duration. The action module watches each machine leave running and return, and refuses to conclude when it never saw it change.

Parameters

Parameter

Comments

scaleway_rolling_reboot_batch_size

integer

How many machines to reboot at once. One at a time is the safe default; a larger batch is a decision.

Default: 1

scaleway_rolling_reboot_group

string

The inventory group to roll through. Empty means do nothing and say so, because a roll with no target would reboot whatever the inventory happens to hold.

Default: ""

scaleway_rolling_reboot_selector

dictionary

What to roll through, said the same way everywhere: exactly one of group, name or tags, plus match set to all or any when several tags are given.

all is the default, because it is the narrower selection: for an operation that writes, erring on the safe side means touching fewer machines, never more.

An ambiguous name is refused rather than settled, and an unknown key is refused rather than selecting nothing, because a typo and an empty fleet look alike.

kind says what is being rolled through, instance by default or k8s_node for the nodes of a Kubernetes pool. It is not a criterion: the selector still carries exactly one of those, and the same grammar holds for a machine and for a node.

For k8s_node, group means the pool, which groups nodes the way an inventory group groups machines, and the list comes from the API rather than from the inventory, which serves no Kubernetes. tags is not accepted there: a node carries none, and passing a pool’s off as its own would add a hop you cannot see.

Default: {}

scaleway_rolling_reboot_wait_timeout

integer

Bound, in seconds, for the observation the action module performs on each machine. Not a sleep.

Default: 300

scaleway_rolling_reboot_zones

list / elements=string

The zones to ask when the selector designates pool nodes; the regions are derived from them. Ignored for Instances, which come from the inventory with their zone.