Skip to content

Commit

Permalink
Fix linux-2.6 in download URL for RedHat x86_64
Browse files Browse the repository at this point in the history
Staring with 9.0.5 Splunk changed the filename of the RPM. It no longer includes
"linux-2.6", thus we need to adapt to this change.

Only checked for RedHat x86_64, other releases might be affected as well. If so,
apply the $linux_prefix variable where needed.
  • Loading branch information
siegy22 committed Mar 15, 2024
1 parent ce25cf6 commit 173a9e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@
default: { $package_provider = undef } # Don't define a $package_provider
}

# Download URLs changed starting from 9.0.5 for RPMs.
# Splunk no longer includes "-linux-2.6-".
$linux_prefix = versioncmp($version, '9.0.5') ? {
1 => '.',
0 => '.',
-1 => '-linux-2.6-',
}

# Settings specific to an architecture as well as an OS family
case "${facts['os']['family']} ${facts['os']['architecture']}" {
'RedHat i386': {
Expand All @@ -306,7 +314,7 @@
$enterprise_package_name = 'splunk'
}
'RedHat x86_64': {
$package_suffix = "${version}-${build}-linux-2.6-x86_64.rpm"
$package_suffix = "${version}-${build}${linux_prefix}x86_64.rpm"
$forwarder_package_name = 'splunkforwarder'
$enterprise_package_name = 'splunk'
}
Expand Down

0 comments on commit 173a9e9

Please sign in to comment.