From f9b4efc165a9e0b4177d281096a3e4d2309efeff Mon Sep 17 00:00:00 2001 From: surprisingb Date: Tue, 31 Mar 2020 16:14:00 +0200 Subject: [PATCH] Add service ensure parameter Add parameter to manage service status --- manifests/init.pp | 3 ++- manifests/params.pp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 5967e5c..4314a36 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -14,6 +14,7 @@ $conffile = $xinetd::params::conffile, $package_name = $xinetd::params::package_name, $package_ensure = $xinetd::params::package_ensure, + $service_ensure = $xinetd::params::service_ensure, $service_name = $xinetd::params::service_name, $service_restart = $xinetd::params::service_restart, $service_status = $xinetd::params::service_status, @@ -71,7 +72,7 @@ } service { $service_name: - ensure => running, + ensure => $service_ensure, enable => true, hasrestart => $service_hasrestart, hasstatus => $service_hasstatus, diff --git a/manifests/params.pp b/manifests/params.pp index 023045e..ea1bcb6 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,6 +3,7 @@ class xinetd::params { $default_user = 'root' $package_ensure = 'installed' + $service_ensure = 'running' case $::osfamily { 'FreeBSD': { $default_group = 'wheel' }