6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'manifests/first_time_run.pp', line 6
class splunk::first_time_run (
$package = $splunk::package,
$package_source = $splunk::package_source,
$splunk_home = $splunk::splunk_home,
$splunk_os_user = $splunk::real_splunk_os_user,
$version = $splunk::version
) {
case $::osfamily {
/^[Ww]indows$/: {
# Do nothing
}
default: {
exec { 'splunk first time run':
command => "${splunk_home}/bin/splunk ftr -user ${splunk_os_user} --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
user => $splunk_os_user,
onlyif => "/usr/bin/test -e ${splunk_home}/ftr"
}
}
}
}
|