Skip to content

Commit

Permalink
This commit makes the splunk_user 'configurable'
Browse files Browse the repository at this point in the history
Also set the user for Windows to 'administrator', since the user
root is not known in the Windows enviroment
  • Loading branch information
ralfbosz committed Apr 18, 2017
1 parent 72acc62 commit 4b7b747
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
$server = 'splunk',
$forwarder_installdir = undef,
$server_installdir = undef,
$splunk_user = undef,
) {

# Based on the small number of inputs above, we can construct sane defaults
Expand All @@ -90,9 +91,11 @@
if $::osfamily == 'Windows' {
$forwarder_dir = pick($forwarder_installdir, 'C:\\Program Files\\SplunkUniversalForwarder')
$server_dir = pick($server_installdir, 'C:/Program Files/Splunk')
$splunk_user = pick($splunk_user, 'Administrator')
} else {
$forwarder_dir = pick($forwarder_installdir, '/opt/splunkforwarder')
$server_dir = pick($server_installdir, '/opt/splunk')
$splunk_user = pick($splunk_user, 'root')
}

# Settings common to a kernel
Expand Down Expand Up @@ -238,7 +241,6 @@
$create_password = true

$forwarder_pkg_ensure = 'installed'
$splunk_user = 'root'

# A meta resource so providers know where splunk is installed:
splunk_config { 'splunk':
Expand Down

0 comments on commit 4b7b747

Please sign in to comment.