Skip to content

Commit

Permalink
Stop requiring net-tools for Splunk 8.x and newer
Browse files Browse the repository at this point in the history
Also make sure to not install net-tools on splunk enterprise, this was just
added to the splunk forwarder, not for splunk enterprise in #335
  • Loading branch information
siegy22 committed Mar 17, 2024
1 parent 1054ac0 commit 6f4cb20
Show file tree
Hide file tree
Showing 3 changed files with 354 additions and 344 deletions.
9 changes: 7 additions & 2 deletions manifests/enterprise/install/nix.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@
}
}

# Required for splunk 7.2.4.2
if $splunk::params::manage_net_tools and versioncmp($splunk::enterprise::version, '7.2.4.2') >= 0 {
# Required for splunk from 7.2.4.2 until 8.0.0
if (
$splunk::params::manage_net_tools and
$facts['kernel'] == 'Linux' and
versioncmp($splunk::enterprise::version, '7.2.4.2') >= 0 and
versioncmp($splunk::enterprise::version, '8.0.0') == -1
) {
stdlib::ensure_packages(['net-tools'], {
'ensure' => 'present',
})
Expand Down
9 changes: 7 additions & 2 deletions manifests/forwarder/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@
}
}

# Required for splunk 7.2.4.2
if $splunk::params::manage_net_tools and $facts['kernel'] == 'Linux' and (versioncmp($splunk::forwarder::version, '7.2.4.2') >= 0) {
# Required for splunk from 7.2.4.2 until 8.0.0
if (
$splunk::params::manage_net_tools and
$facts['kernel'] == 'Linux' and
versioncmp($splunk::forwarder::version, '7.2.4.2') >= 0 and
versioncmp($splunk::forwarder::version, '8.0.0') == -1
) {
stdlib::ensure_packages(['net-tools'], {
'ensure' => 'present',
})
Expand Down
Loading

0 comments on commit 6f4cb20

Please sign in to comment.