Puppet Class: cis_security_hardening::reboot

Defined in:
manifests/reboot.pp

Summary

Handle necessary reboot

Overview

Class triggered by resources requesting a system reboot

Examples:

include cis_security_hardening::reboot

Parameters:

  • time_until_reboot (Integer) (defaults to: $cis_security_hardening::time_until_reboot)

    Time to wait until system is rebooted if required. Time in seconds. For ‘reboot` the `puppetlabs-reboot` module is used. Please obey the follwing comment from this module: POSIX systems (with the exception of Solaris) only support specifying the timeout as minutes. As such, the value of timeout must be a multiple of 60. Other values will be rounded up to the nearest minute and a warning will be issued.

  • auto_reboot (Boolean) (defaults to: $cis_security_hardening::auto_reboot)

    Reboot when necessary after ‘time_until_reboot` is exeeded



16
17
18
19
20
21
22
23
24
25
26
27
# File 'manifests/reboot.pp', line 16

class cis_security_hardening::reboot (
  Boolean $auto_reboot       = $cis_security_hardening::auto_reboot,
  Integer $time_until_reboot = $cis_security_hardening::time_until_reboot,
) {
  if $auto_reboot {
    reboot { 'after_run':
      timeout => $time_until_reboot,
      message => 'forced reboot by Puppet',
      apply   => 'finished',
    }
  }
}