Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
removed the provider selector
update type validation service_ensure
removed service_ensure from params.pp
  • Loading branch information
cjswart committed Dec 13, 2024
1 parent d5a8432 commit 69f60ed
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion manifests/forwarder.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions manifests/forwarder/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
4 changes: 0 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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'
Expand All @@ -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"
Expand Down

0 comments on commit 69f60ed

Please sign in to comment.