blob: 741e65b2be4bc3ebd6d18182ad534cedc96530ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
class ntp::service (
$service_enable = $ntp::service_enable,
$service_ensure = $ntp::service_ensure,
$service_manage = $ntp::service_manage,
$service_name = $ntp::service_name,
) inherits ntp {
if ! ($service_ensure in [ 'running', 'stopped' ]) {
fail('service_ensure parameter must be running or stopped')
}
if $service_manage == true {
service { 'ntp':
ensure => $service_ensure,
enable => $service_enable,
name => $service_name,
hasstatus => true,
hasrestart => true,
}
}
}
|