From 54dc2ba6fdff2fee63f7266bb88b08f96bf974e0 Mon Sep 17 00:00:00 2001 From: Pierre Hanselmann Date: Thu, 12 Feb 2015 09:15:05 +0100 Subject: [PATCH] Flags parameter is only supported on OpenBSD and breaks on some other systems like RH (on puppet 3.4.x) --- manifests/service.pp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/manifests/service.pp b/manifests/service.pp index 4102596..63b733e 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -35,14 +35,28 @@ class nginx::service( $service_ensure_real = $service_ensure } - service { 'nginx': - ensure => $service_ensure_real, - name => $service_name, - enable => $service_enable, - flags => $service_flags, - hasstatus => true, - hasrestart => true, + case $::osfamilly { + 'OpenBSD': { + service { 'nginx': + ensure => $service_ensure_real, + name => $service_name, + enable => $service_enable, + 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 { Service['nginx'] { restart => $service_restart,