Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
9fdfeb6
add no check certificate to deal with wget error
cudgel Sep 22, 2023
00ed6e9
bump version
cudgel Sep 22, 2023
33e5823
pdk update
cudgel Sep 22, 2023
3147c42
revert changes
cudgel Sep 22, 2023
0b9500e
remove lock
cudgel Sep 22, 2023
8e8a257
update ruby version in travis
cudgel Sep 25, 2023
9023684
remove stdlib
cudgel Sep 25, 2023
b50a270
update dist
cudgel Sep 25, 2023
6c26e45
remove symlink
cudgel Sep 26, 2023
6a7a58a
remote host override
cudgel Oct 5, 2023
879d50e
update fact to not rely on running state
cudgel Dec 20, 2024
bd4cf8d
get my facts straight
cudgel Dec 20, 2024
2745f47
stop and remove splunk if type is explicitly set to none
cudgel Dec 21, 2024
74bf390
cleanup
cudgel Dec 21, 2024
7215495
check before run
cudgel Dec 21, 2024
9d58402
use fact for install dir, cleaner code
cudgel Dec 22, 2024
1d014a5
use correct fact
cudgel Dec 22, 2024
aa90f33
update facts reference
cudgel Dec 22, 2024
fd15da8
linting, default for variable
cudgel Jan 2, 2025
475eb45
set variable before template
cudgel Jan 2, 2025
e0cdeff
add hostname fact
cudgel Jan 2, 2025
4ae0964
update arch
cudgel Jan 2, 2025
d17aa41
default to x64
cudgel Jan 2, 2025
1b1df7a
hard code arch temporarily
cudgel Jan 2, 2025
a324e28
cleanup
cudgel Jan 2, 2025
3e3dee0
hard code arch
cudgel Jan 2, 2025
c02ba0b
fix variable reference
cudgel Jan 2, 2025
41196ea
restore arch
cudgel Jan 2, 2025
23dd5c1
linting, fix selinux fact
cudgel Jan 2, 2025
6f1f59f
use os selinux
cudgel Jan 2, 2025
6d5d67c
update facts reference
cudgel Jan 2, 2025
2896145
disambiguate variables from facts
cudgel Jan 2, 2025
fd7e4d5
update version
cudgel Jan 2, 2025
cc06c6b
update pdk
cudgel Jan 2, 2025
7e17a32
update service file
cudgel Jan 2, 2025
e47c616
add testacl before applying acl.
cudgel Jan 6, 2025
4c40549
update args for fact
cudgel Jan 6, 2025
03a8627
updates to spec test, linting
cudgel Jan 8, 2025
bbdc5aa
update version
cudgel Jan 8, 2025
5f1e13e
use manifest instead of binary for fact
cudgel Apr 25, 2025
1b31368
new version to support changes to Splunk module naming, fixes for upd…
cudgel Sep 21, 2025
cad75eb
Migrate from Travis CI to GitHub Actions
cudgel Sep 21, 2025
3ee0653
Update modulefile
cudgel Sep 21, 2025
9d64154
Remove bin/ files from tracking (now properly ignored)
cudgel Sep 22, 2025
e3f5f66
merges from master
cudgel Sep 22, 2025
7eef84f
remove site.pp
cudgel Sep 22, 2025
2c5b1a4
remove deprecated modulefile
cudgel Sep 22, 2025
dee69c6
remove module symlink
cudgel Sep 22, 2025
7df736d
update gem file to fix pson issue
cudgel Sep 22, 2025
adbe31b
update splunk fetch to handle new format url as well as old, increase…
cudgel Sep 22, 2025
4393053
update REXML vulnerabilities
cudgel Sep 22, 2025
c4fc8f6
fix regression in splunk fetch
cudgel Sep 23, 2025
f47adc7
Merge branch 'master' into dev
cudgel Sep 23, 2025
d99fe1e
update fetch using product from init, spec tests for url
cudgel Sep 23, 2025
bdc1155
simplify fetch with removal of redundant code
cudgel Sep 23, 2025
cd18698
update default type
cudgel Sep 23, 2025
6a0b319
update acl to prevent unnecessary corrective actions
cudgel Sep 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/common.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
splunk::group: 'splunk'
splunk::user: 'splunk'
splunk::type: 'none'
splunk::type: 'forwarder'
splunk::admin_pass: 'changeme'
splunk::adhoc_searchhead: false
splunk::autolb: true
Expand Down
2 changes: 2 additions & 0 deletions manifests/acl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@
exec { "set_acl_${object}":
command => "setfacl -m ${acl} ${object}",
onlyif => $testacl,
unless => "getfacl ${object} 2>/dev/null | grep -q '${acl}'",
path => '/bin:/usr/bin:/sbin:/usr/sbin',
}

if $_recurse == true {
exec { "set_acl_recursive_${object}":
command => "setfacl -R -m ${acl} ${object}",
onlyif => $testacl,
unless => "getfacl ${object} 2>/dev/null | grep -q '${acl}'",
path => '/bin:/usr/bin:/sbin:/usr/sbin',
}
}
Expand Down
27 changes: 2 additions & 25 deletions manifests/fetch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$source = $splunk::source
$sourcepart = $splunk::sourcepart
$type = $splunk::type
$product = $splunk::product
$version = $splunk::version
$release = $splunk::release
$newsource = $splunk::newsource
Expand All @@ -29,34 +30,10 @@
$version_parts = split($version, '\.')
$major = $version_parts[0]
$minor = pick($version_parts, 1, '0')
$is_new_naming = versioncmp("${major}.${minor}.0", '9.4.0') >= 0

if $is_new_naming {
$pkg_kernel = 'linux'
$pkg_arch = $facts['os']['architecture'] ? {
'x86_64' => 'amd64',
'amd64' => 'amd64',
default => 'amd64'
}
$pkg_platform = "${pkg_kernel}-${pkg_arch}"
} else {
$pkg_kernel = $facts['kernel']
$pkg_arch = $facts['os']['architecture'] ? {
'x86_64' => 'x86_64',
'amd64' => 'x86_64',
default => 'i686'
}
$pkg_platform = "${pkg_kernel}-${pkg_arch}"
}

if $type == 'forwarder' {
$product = 'universalforwarder'
} else {
$product = 'splunk'
}
if $source == 'splunk' or $source =~ /http.*/ {
if $source == 'splunk' {
$wget_url = "https://download.splunk.com/products/${product}/releases/${version}/linux/${sourcepart}-${version}-${release}-${pkg_platform}.tgz"
$wget_url = "https://download.splunk.com/products/${product}/releases/${version}/linux/${newsource}"
} else {
$wget_url = "${source}/${newsource}"
}
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@

if $type == 'forwarder' {
$sourcepart = 'splunkforwarder'
$product = 'universalforwarder'
} else {
$sourcepart = 'splunk'
$product = 'splunk'
}

# Use computed platform token when building package filename
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cudgel-splunk",
"version": "2.3.4",
"version": "2.3.5",
"author": "Christopher Caldwell",
"summary": "Deploy and manage stand-alone or distributed Splunk architectures.",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/splunk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
it { is_expected.to contain_file('/home/splunk/.bashrc.custom') }
it { is_expected.to contain_class('splunk::fetch') }
it { is_expected.to contain_exec('retrieve_splunkforwarder-9.4.4-f627d88b766b-linux-amd64.tgz') }
it { is_expected.to contain_notify('wget_command') }
it { is_expected.to contain_notify('wget_command').with_message(%r{universalforwarder}) }
it { is_expected.to contain_class('splunk::install') }
it { is_expected.to contain_file('/opt/splunkforwarder-9.4.4-f627d88b766b-linux-amd64.tgz').that_notifies('Exec[unpackSplunk]') }
it { is_expected.to contain_class('splunk::config') }
Expand Down