Change power state

These examples demonstrate how to configure the shutdown/reboot of the system after all other config modules have been run.

For a full list of keys, refer to the power state change module schema.

Example 1

1#cloud-config
2power_state:
3  delay: now
4  mode: poweroff
5  message: Powering off
6  timeout: 2
7  condition: true

Example 2

1#cloud-config
2power_state:
3  delay: 30
4  mode: reboot
5  message: Rebooting machine
6  condition: test -f /var/tmp/reboot_me