Puppet Class: psick::time

Defined in:
manifests/time.pp

Overview

Class psick::time This class manages time on different OS in various ways:

On Windows the psick::windows::time class is used to set ntp.

Parameters:

  • servers (Array) (defaults to: [])

    Arrays of ntp servers to set

  • method (Enum['chrony','ntpdate','ntp','']) (defaults to: 'ntpdate')

    How to set time via ntp. chrony - use Chrony. Requires aboe/chrony module ntp - use official Puppet Ntp module. Requires puppetlabs/ntp ntpdate - Schedule ntp updates via psick::time::ntpdate

  • timezone (Optional[String]) (defaults to: $::psick::timezone)


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/time.pp', line 12

class psick::time (
  Array $servers                            = [],
  Optional[String] $timezone                = $::psick::timezone,
  Enum['chrony','ntpdate','ntp',''] $method = 'ntpdate',
) {

  if $::kernel != 'windows' and $timezone {
    contain ::psick::timezone
  }

  if $::kernel == 'Linux' and $method == 'chrony' {
    class { '::chrony':
      servers => $servers,
    }
  }

  if $::kernel == 'Linux' and $method == 'ntpdate' {
    contain ::psick::time::ntpdate
  }

  if $::kernel != 'Windows' and $method == 'ntp' {
    class { '::ntp':
      servers => $servers,
    }
  }

  if $::osfamily == 'Windows' {
    contain ::psick::time::windows
  }

}