Flags parameter is only supported on OpenBSD and breaks on some other systems like RH (on puppet 3.4.x)

This commit is contained in:
Pierre Hanselmann 2015-02-12 09:15:05 +01:00
parent a19cb94f23
commit 54dc2ba6fd

View file

@ -35,14 +35,28 @@ class nginx::service(
$service_ensure_real = $service_ensure $service_ensure_real = $service_ensure
} }
service { 'nginx': case $::osfamilly {
ensure => $service_ensure_real, 'OpenBSD': {
name => $service_name, service { 'nginx':
enable => $service_enable, ensure => $service_ensure_real,
flags => $service_flags, name => $service_name,
hasstatus => true, enable => $service_enable,
hasrestart => true, flags => '',
hasstatus => true,
hasrestart => true,
}
}
default: {
service { 'nginx':
ensure => $service_ensure_real,
name => $service_name,
enable => $service_enable,
hasstatus => true,
hasrestart => true,
}
}
} }
if $configtest_enable == true { if $configtest_enable == true {
Service['nginx'] { Service['nginx'] {
restart => $service_restart, restart => $service_restart,