Canonical PowerControlMachine

Canonical PowerControlMachine

Certified
Enterprise Edition

Change MAAS machine power state

Invoke MAAS power operations (on, off, cycle, query) for a machine. Cycle issues an off then on with a brief BMC settle delay. Optionally poll until the expected state (default 5m timeout).

yaml
type: io.kestra.plugin.ee.canonical.maas.PowerControlMachine

Power cycle a machine

yaml
id: power_cycle_server
namespace: company.team
tasks:
  - id: power_cycle_server
    type: io.kestra.plugin.ee.canonical.maas.PowerControlMachine
    url: "{{ secret('MAAS_URL') }}"
    apiKey: "{{ secret('MAAS_API_KEY') }}"
    systemId: "{{ outputs.deploy_ubuntu_server.systemId }}"
    action: "cycle"
    waitForPowerState: true
    expectedState: "on"
    timeout: PT5M
    stopMode: "hard"
Properties
Possible Values
ONOFFCYCLEQUERY

Action

Power action to execute: on, off, cycle, or query.

MAAS API key

MAAS API key in the consumer: token: secret format.

System ID

MAAS system identifier of the machine to control; machine must already exist.

MAAS URL

Base URL of the MAAS server, including the MAAS context path. Example: https://maas.example.com/MAAS

Expected power state

Power state to wait for (on or off); defaults to the action-derived target and ignored for query.

Stop mode

Stop mode to use for power off operations (for example soft or hard); ignored for on or query.

DefaultPT5M

Timeout

Maximum time to wait for the machine to reach the expected power state when waiting; defaults to 5 minutes.

Defaultfalse

Wait for power state

Whether to poll MAAS until the machine reaches the expected power state; defaults to false and is not used for query.

Power state

Power state reported by MAAS after the action or query.

System ID

MAAS system identifier for the machine.