|
30 | 30 |
|
31 | 31 | case $::osfamily {
|
32 | 32 | 'AIX': {
|
33 |
| - $config = '/etc/ntp.conf' |
34 |
| - $keys_file = '/etc/ntp.keys' |
| 33 | + $config = $default_config |
| 34 | + $keys_file = '/etc/ntp.keys' |
35 | 35 | $driftfile = '/etc/ntp.drift'
|
36 | 36 | $package_name = [ 'bos.net.tcp.client' ]
|
37 |
| - $restrict = [ |
| 37 | + $restrict = [ |
38 | 38 | 'default nomodify notrap nopeer noquery',
|
39 | 39 | '127.0.0.1',
|
40 | 40 | ]
|
|
48 | 48 | ]
|
49 | 49 | }
|
50 | 50 | 'Debian': {
|
51 |
| - $restrict = [ |
| 51 | + $config = $default_config |
| 52 | + $keys_file = $default_keys_file |
| 53 | + $driftfile = $default_driftfile |
| 54 | + $package_name = $default_package_name |
| 55 | + $restrict = [ |
52 | 56 | 'default kod nomodify notrap nopeer noquery',
|
53 | 57 | '-6 default kod nomodify notrap nopeer noquery',
|
54 | 58 | '127.0.0.1',
|
|
64 | 68 | ]
|
65 | 69 | }
|
66 | 70 | 'RedHat': {
|
67 |
| - $restrict = [ |
| 71 | + $config = $default_config |
| 72 | + $keys_file = $default_keys_file |
| 73 | + $driftfile = $default_driftfile |
| 74 | + $package_name = $default_package_name |
| 75 | + $service_name = $default_service_name |
| 76 | + $restrict = [ |
68 | 77 | 'default kod nomodify notrap nopeer noquery',
|
69 | 78 | '-6 default kod nomodify notrap nopeer noquery',
|
70 | 79 | '127.0.0.1',
|
71 | 80 | '-6 ::1',
|
72 | 81 | ]
|
73 |
| - $service_name = 'ntpd' |
74 | 82 | $iburst_enable = false
|
75 | 83 | $servers = [
|
76 | 84 | '0.centos.pool.ntp.org',
|
|
79 | 87 | ]
|
80 | 88 | }
|
81 | 89 | 'SuSE': {
|
| 90 | + $config = $default_config |
| 91 | + $keys_file = $default_keys_file |
82 | 92 | $driftfile = '/var/lib/ntp/drift/ntp.drift'
|
83 |
| - $restrict = [ |
| 93 | + $package_name = $default_package_name |
| 94 | + $restrict = [ |
84 | 95 | 'default kod nomodify notrap nopeer noquery',
|
85 | 96 | '-6 default kod nomodify notrap nopeer noquery',
|
86 | 97 | '127.0.0.1',
|
|
96 | 107 | ]
|
97 | 108 | }
|
98 | 109 | 'FreeBSD': {
|
| 110 | + $config = $default_config |
99 | 111 | $driftfile = '/var/db/ntpd.drift'
|
| 112 | + $keys_file = $default_keys_file |
100 | 113 | $package_name = ['net/ntp']
|
101 |
| - $restrict = [ |
| 114 | + $restrict = [ |
102 | 115 | 'default kod nomodify notrap nopeer noquery',
|
103 | 116 | '-6 default kod nomodify notrap nopeer noquery',
|
104 | 117 | '127.0.0.1',
|
105 | 118 | '-6 ::1',
|
106 | 119 | ]
|
107 |
| - $service_name = 'ntpd' |
| 120 | + $service_name = $default_service_name |
108 | 121 | $iburst_enable = true
|
109 | 122 | $servers = [
|
110 | 123 | '0.freebsd.pool.ntp.org maxpoll 9',
|
|
114 | 127 | ]
|
115 | 128 | }
|
116 | 129 | 'Archlinux': {
|
117 |
| - $restrict = [ |
| 130 | + $config = $default_config |
| 131 | + $keys_file = $default_keys_file |
| 132 | + $driftfile = $default_driftfile |
| 133 | + $package_name = $default_package_name |
| 134 | + $service_name = $default_service_name |
| 135 | + $restrict = [ |
118 | 136 | 'default kod nomodify notrap nopeer noquery',
|
119 | 137 | '-6 default kod nomodify notrap nopeer noquery',
|
120 | 138 | '127.0.0.1',
|
121 | 139 | '-6 ::1',
|
122 | 140 | ]
|
123 |
| - $service_name = 'ntpd' |
124 | 141 | $iburst_enable = false
|
125 | 142 | $servers = [
|
126 | 143 | '0.pool.ntp.org',
|
|
129 | 146 | ]
|
130 | 147 | }
|
131 | 148 | 'Solaris': {
|
132 |
| - $config = '/etc/inet/ntp.conf' |
133 |
| - $driftfile = '/var/ntp/ntp.drift' |
134 |
| - $keys_file = '/etc/inet/ntp.keys' |
135 |
| - $package_name = $::operatingsystemrelease ? { |
| 149 | + $config = '/etc/inet/ntp.conf' |
| 150 | + $driftfile = '/var/ntp/ntp.drift' |
| 151 | + $keys_file = '/etc/inet/ntp.keys' |
| 152 | + $package_name = $::operatingsystemrelease ? { |
136 | 153 | /^(5\.10|10|10_u\d+)$/ => [ 'SUNWntpr', 'SUNWntpu' ],
|
137 | 154 | /^(5\.11|11|11\.\d+)$/ => [ 'service/network/ntp' ]
|
138 | 155 | }
|
139 |
| - $restrict = [ |
| 156 | + $restrict = [ |
140 | 157 | 'default kod nomodify notrap nopeer noquery',
|
141 | 158 | '-6 default kod nomodify notrap nopeer noquery',
|
142 | 159 | '127.0.0.1',
|
143 | 160 | '-6 ::1',
|
144 | 161 | ]
|
145 |
| - $service_name = 'network/ntp' |
| 162 | + $service_name = 'network/ntp' |
146 | 163 | $iburst_enable = false
|
147 |
| - $servers = [ |
| 164 | + $servers = [ |
148 | 165 | '0.pool.ntp.org',
|
149 | 166 | '1.pool.ntp.org',
|
150 | 167 | '2.pool.ntp.org',
|
|
153 | 170 | }
|
154 | 171 | # Gentoo was added as its own $::osfamily in Facter 1.7.0
|
155 | 172 | 'Gentoo': {
|
| 173 | + $config = $default_config |
| 174 | + $keys_file = $default_keys_file |
| 175 | + $driftfile = $default_driftfile |
156 | 176 | $package_name = ['net-misc/ntp']
|
157 |
| - $restrict = [ |
| 177 | + $service_name = $default_service_name |
| 178 | + $restrict = [ |
158 | 179 | 'default kod nomodify notrap nopeer noquery',
|
159 | 180 | '-6 default kod nomodify notrap nopeer noquery',
|
160 | 181 | '127.0.0.1',
|
161 | 182 | '-6 ::1',
|
162 | 183 | ]
|
163 |
| - $service_name = 'ntpd' |
164 | 184 | $iburst_enable = false
|
165 | 185 | $servers = [
|
166 | 186 | '0.gentoo.pool.ntp.org',
|
|
174 | 194 | # Before Facter 1.7.0 Gentoo did not have its own $::osfamily
|
175 | 195 | case $::operatingsystem {
|
176 | 196 | 'Gentoo': {
|
| 197 | + $config = $default_config |
| 198 | + $keys_file = $default_keys_file |
| 199 | + $driftfile = $default_driftfile |
| 200 | + $service_name = $default_service_name |
177 | 201 | $package_name = ['net-misc/ntp']
|
178 |
| - $restrict = [ |
| 202 | + $restrict = [ |
179 | 203 | 'default kod nomodify notrap nopeer noquery',
|
180 | 204 | '-6 default kod nomodify notrap nopeer noquery',
|
181 | 205 | '127.0.0.1',
|
182 | 206 | '-6 ::1',
|
183 | 207 | ]
|
184 |
| - $service_name = 'ntpd' |
185 | 208 | $iburst_enable = false
|
186 | 209 | $servers = [
|
187 | 210 | '0.gentoo.pool.ntp.org',
|
|
199 | 222 | fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
|
200 | 223 | }
|
201 | 224 | }
|
202 |
| - if $config == undef { |
203 |
| - $config = $default_config |
204 |
| - } |
205 |
| - if $keys_file == undef { |
206 |
| - $keys_file = $default_keys_file |
207 |
| - } |
208 |
| - if $driftfile == undef { |
209 |
| - $driftfile = $default_driftfile |
210 |
| - } |
211 |
| - if $package_name == undef { |
212 |
| - $package_name = $default_package_name |
213 |
| - } |
214 |
| - if $service_name == undef { |
215 |
| - $service_name = $default_service_name |
216 |
| - } |
217 | 225 | }
|
0 commit comments