diff --git a/manifests/service.pp b/manifests/service.pp index a72575d..78c3fde 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -72,41 +72,21 @@ $allow_isolate = undef, ) { - if($type!=undef and $forking==true) + if($type != undef and $forking == true) { fail('Incompatible options: type / forking') } - if($type != 'oneshot' and is_array($execstart) and count($execstart) > 1) + if($type != 'oneshot' and $execstart.is_a(Array) and count($execstart) > 1) { fail('Incompatible options: There are multiple execstart values and Type is not "oneshot"') } - if($type != 'oneshot' and is_array($execstop) and count($execstop) > 1) + if($type != 'oneshot' and $execstop.is_a(Array) and count($execstop) > 1) { fail('Incompatible options: There are multiple execstop values and Type is not "oneshot"') } - # TODO: puppet4 / puppet 6 compatibility - # if(size($unset_env_vars)>0) - # { - # if(defined($::eyp_systemd_release)) - # { - # $systemd_release=0+$::eyp_systemd_release - # - # if($systemd_release < 235) - # { - # fail("ERROR: UnsetEnvironment is not available for systemd < 235 - current release: ${systemd_release}") - # } - # } - # } - - # if($restart!=undef) - # { - # # Takes one of no, on-success, on-failure, on-abnormal, on-watchdog, on-abort, or always. - # validate_re($restart, [ '^no$', '^on-success$', '^on-failure$', '^on-abnormal$', '^on-watchdog$', '^on-abort$', '^always$'], "Not a supported restart type: ${restart} - Takes one of no, on-success, on-failure, on-abnormal, on-watchdog, on-abort, or always") - # } - include ::systemd concat { "/etc/systemd/system/${servicename}.service": diff --git a/metadata.json b/metadata.json index 3da19dd..53a1d96 100644 --- a/metadata.json +++ b/metadata.json @@ -58,7 +58,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 3.8.0" + "version_requirement": ">= 4.0.0" } ] }