1
2
3
4
5
6
7
8
9
10
11
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
class ntp::params() {
$autoupdate = false
$package_ensure = 'present'
$restrict = true
$service_enable = true
$service_ensure = 'running'
$service_manage = true
case $::osfamily {
'Debian': {
$config = '/etc/ntp.conf'
$config_template = 'ntp/ntp.conf.debian.erb'
$package_name = [ 'ntp' ]
$service_name = 'ntp'
$servers = [
'0.debian.pool.ntp.org iburst',
'1.debian.pool.ntp.org iburst',
'2.debian.pool.ntp.org iburst',
'3.debian.pool.ntp.org iburst',
]
}
'RedHat': {
$config = '/etc/ntp.conf'
$config_template = 'ntp/ntp.conf.el.erb'
$package_name = [ 'ntp' ]
$service_name = 'ntpd'
$servers = [
'0.centos.pool.ntp.org',
'1.centos.pool.ntp.org',
'2.centos.pool.ntp.org',
]
}
'SuSE': {
$config = '/etc/ntp.conf'
$config_template = 'ntp/ntp.conf.suse.erb'
$package_name = [ 'ntp' ]
$service_name = 'ntp'
$servers = [
'0.opensuse.pool.ntp.org',
'1.opensuse.pool.ntp.org',
'2.opensuse.pool.ntp.org',
'3.opensuse.pool.ntp.org',
]
}
'FreeBSD': {
$config = '/etc/ntp.conf'
$config_template = 'ntp/ntp.conf.freebsd.erb'
$package_name = ['net/ntp']
$service_name = 'ntpd'
$servers = [
'0.freebsd.pool.ntp.org iburst maxpoll 9',
'1.freebsd.pool.ntp.org iburst maxpoll 9',
'2.freebsd.pool.ntp.org iburst maxpoll 9',
'3.freebsd.pool.ntp.org iburst maxpoll 9',
]
}
'Linux': {
# Account for distributions that don't have $::osfamily specific settings.
case $::operatingsystem {
'Archlinux': {
$config = '/etc/ntp.conf'
$config_template = 'ntp/ntp.conf.archlinux.erb'
$package_name = ['ntp']
$service_name = 'ntpd'
$servers = [
'0.pool.ntp.org',
'1.pool.ntp.org',
'2.pool.ntp.org',
]
}
'Gentoo': {
$config = '/etc/ntp.conf'
$config_template = 'ntp/ntp.conf.gentoo.erb'
$package_name = ['net-misc/ntp']
$service_name = 'ntpd'
$servers = [
'0.gentoo.pool.ntp.org',
'1.gentoo.pool.ntp.org',
'2.gentoo.pool.ntp.org',
'3.gentoo.pool.ntp.org',
]
}
default: {
fail("The ${module_name} module is not supported on an ${::operatingsystem} distribution.")
}
}
}
default: {
fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
}
}
}
|