Skip to content

Latest commit

 

History

History
272 lines (150 loc) · 5.93 KB

REFERENCE.md

File metadata and controls

272 lines (150 loc) · 5.93 KB

Reference

Table of Contents

Resource types

Tasks

Plans

  • reboot: Reboots targets and waits for them to be available again.

Resource types

reboot

The reboot type.

Properties

The following properties are available in the reboot type.

when

Valid values: refreshed, pending

When to check for, and if needed, perform a reboot. If pending, then the provider will check if a reboot is pending, and only if needed, reboot the system. If refreshed then the reboot will only be performed in response to a refresh event from another resource, e.g. package.

Default value: refreshed

Parameters

The following parameters are available in the reboot type.

apply

Valid values: immediately, finished

When to apply the reboot. If immediately, then the provider will stop applying additional resources and apply the reboot once puppet has finished syncing. If finished, it will continue applying resources and then perform a reboot at the end of the run. The default is immediately.

Default value: immediately

message

Default value: Puppet is rebooting the computer

name

namevar

onlyif

For pending reboots, only reboot if the reboot is pending for one of the supplied reasons.

provider

The specific backend to use for this reboot resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform.

timeout

The amount of time in seconds to wait between the time the reboot is requested and when the reboot is performed. The default timeout is 60 seconds. Note that this time starts once puppet has exited the current run.

Default value: 60

unless

For pending reboots, ignore the supplied reasons when checking pennding reboot

Tasks

init

Reboots a machine

Supports noop? false

Parameters

timeout

Data type: Optional[Variant[Pattern[/^[0-9]*$/],Integer]]

Timeout before shutdown (seconds); enforces a minimum of 3s

message

Data type: Optional[Pattern[/^[^|&]*$/]]

Shutdown message for systems that support it

shutdown_only

Data type: Optional[Boolean]

Only shut the machine down, do not reboot

last_boot_time

Gets the last boot time of a Linux or Windows system

Supports noop? false

last_boot_time_nix

Gets the last boot time of a Linux system

Supports noop? false

last_boot_time_win

Gets the last boot time of a Windows system

Supports noop? false

nix

Reboots a machine

Supports noop? false

Parameters

timeout

Data type: Optional[Integer[3]]

Timeout before shutdown (seconds)

message

Data type: Optional[Pattern[/^[^|&]*$/]]

Shutdown message for systems that support it

shutdown_only

Data type: Optional[Boolean]

Only shut the machine down, do not reboot

win

Reboots a machine

Supports noop? false

Parameters

timeout

Data type: Optional[Integer[3]]

Timeout before shutdown (seconds)

message

Data type: Optional[Pattern[/^[^|&]*$/]]

Shutdown message for systems that support it

shutdown_only

Data type: Optional[Boolean]

Only shut the machine down, do not reboot

Plans

reboot

Reboots targets and waits for them to be available again.

Parameters

The following parameters are available in the reboot plan:

targets

Data type: TargetSpec

Targets to reboot.

message

Data type: Optional[String]

Message to log with the reboot (for platforms that support it).

Default value: undef

reboot_delay

Data type: Integer[1]

How long (in seconds) to wait before rebooting. Defaults to 1.

Default value: 1

disconnect_wait

Data type: Integer[0]

How long (in seconds) to wait before checking whether the server has rebooted. Defaults to 10.

Default value: 10

reconnect_timeout

Data type: Integer[0]

How long (in seconds) to attempt to reconnect before giving up. Defaults to 180.

Default value: 180

retry_interval

Data type: Integer[0]

How long (in seconds) to wait between retries. Defaults to 1.

Default value: 1

fail_plan_on_errors

Data type: Boolean

Raise an error if any targets do not successfully reboot. Defaults to true.

Default value: true