1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'manifests/install.pp', line 1
class splunk::install (
$license = $::splunk::license,
$pkgname = $::splunk::pkgname,
$splunkadmin = $::splunk::splunkadmin,
$localusers = $::splunk::localusers,
$splunkhome = $::splunk::splunkhome,
$type = $::splunk::type,
$version = $::splunk::version,
$package_source = $::splunk::package_source,
$package_provider = $::splunk::package_provider,
) {
package { $pkgname:
ensure => $version,
provider => $package_provider,
source => $package_source,
}->
file { '/etc/init.d/splunk':
ensure => present,
mode => '0700',
owner => 'root',
group => 'root',
source => "puppet:///modules/splunk/${::osfamily}/etc/init.d/${pkgname}"
} ->
# inifile
ini_setting { 'Server Name':
ensure => present,
path => "${splunkhome}/etc/system/local/server.conf",
section => 'general',
setting => 'serverName',
value => $::fqdn,
} ->
ini_setting { 'SSL v3 only':
ensure => present,
path => "${splunkhome}/etc/system/local/server.conf",
section => 'sslConfig',
setting => 'supportSSLV3Only',
value => 'True',
} ->
file { "${splunkhome}/etc/splunk.license":
ensure => present,
mode => '0644',
owner => 'splunk',
group => 'splunk',
backup => true,
source => $license,
} ->
file { "${splunkhome}/etc/passwd":
ensure => present,
mode => '0600',
owner => 'root',
group => 'root',
backup => true,
content => template('splunk/opt/splunk/etc/passwd.erb'),
} ->
# recursively copy the contents of the auth dir
# This is causing a restart on the second run. - TODO
file { "${splunkhome}/etc/auth":
mode => '0600',
owner => 'splunk',
group => 'splunk',
recurse => true,
purge => false,
source => 'puppet:///modules/splunk/noarch/opt/splunk/etc/auth',
}
}
|