From 69f60ed846dfbdb4759182cc1b9a29b192c9cfee Mon Sep 17 00:00:00 2001 From: Cees-Jan Swart Date: Fri, 13 Dec 2024 09:09:04 +0100 Subject: [PATCH] fix review comments removed the provider selector update type validation service_ensure removed service_ensure from params.pp --- manifests/forwarder.pp | 2 +- manifests/forwarder/service.pp | 5 ----- manifests/params.pp | 4 ---- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/manifests/forwarder.pp b/manifests/forwarder.pp index 29a28d3d..120eef51 100644 --- a/manifests/forwarder.pp +++ b/manifests/forwarder.pp @@ -178,7 +178,7 @@ Stdlib::Absolutepath $forwarder_homedir = $splunk::params::forwarder_homedir, Stdlib::Absolutepath $forwarder_confdir = $splunk::params::forwarder_confdir, String[1] $service_name = $splunk::params::forwarder_service, - String[1] $service_ensure = $splunk::params::forwarder_service_ensure, + Stdlib::Ensure::Service $service_ensure = running, String[1] $service_enable = $splunk::params::forwarder_service_enable, Stdlib::Absolutepath $service_file = $splunk::params::forwarder_service_file, Boolean $boot_start = $splunk::params::boot_start, diff --git a/manifests/forwarder/service.pp b/manifests/forwarder/service.pp index 14a41ace..68a03205 100644 --- a/manifests/forwarder/service.pp +++ b/manifests/forwarder/service.pp @@ -4,15 +4,10 @@ # sub-classes # class splunk::forwarder::service { - $provider = $facts['os']['family'] ? { - 'windows' => 'windows', - default => undef, - } service { $splunk::forwarder::service_name: ensure => $splunk::forwarder::service_ensure, enable => $splunk::forwarder::service_enable, hasstatus => true, hasrestart => true, - provider => $provider, } } diff --git a/manifests/params.pp b/manifests/params.pp index 3d0cf5a5..a10d7819 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -166,7 +166,6 @@ $enterprise_confdir = "${enterprise_homedir}/etc" $forwarder_install_options = [] $enterprise_install_options = [] - $forwarder_service_ensure = 'running' $forwarder_service_enable = 'true' # Systemd not supported until Splunk 7.2.2 if $facts['service_provider'] == 'systemd' and versioncmp($version, '7.2.2') >= 0 { @@ -200,7 +199,6 @@ $enterprise_confdir = "${enterprise_homedir}/etc" $forwarder_install_options = [] $enterprise_install_options = [] - $forwarder_service_ensure = 'running' $forwarder_service_enable = 'true' # Systemd not supported until Splunk 7.2.2 if $facts['service_provider'] == 'systemd' and versioncmp($version, '7.2.2') >= 0 { @@ -236,7 +234,6 @@ $enterprise_install_options = [] $enterprise_service = 'splunk' $forwarder_service = 'splunk' - $forwarder_service_ensure = 'running' $forwarder_service_enable = 'true' $enterprise_service_file = '/etc/rc.d/splunk' $forwarder_service_file = '/etc/rc.d/splunk' @@ -253,7 +250,6 @@ $forwarder_secret_file = "${forwarder_homedir}\\etc\\auth\\splunk.secret" $enterprise_secret_file = "${enterprise_homedir}\\etc\\auth\\splunk.secret" $forwarder_service = 'SplunkForwarder' - $forwarder_service_ensure = 'running' $forwarder_service_enable = 'delayed' $forwarder_service_file = "${forwarder_homedir}\\dummy" # Not used in Windows, but attribute must be defined with a valid path $forwarder_confdir = "${forwarder_homedir}\\etc"