forked from voxpupuli/puppet-splunk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Moved defaults to module data, and removed the params class * Privatized all `splunk::enterprise::` and `splunk::forwarder::` install, config, and service classes * Added a `$release` param, which replaces the `$version` param * For ensurable package_providers, the release is used as the Splunk package ensure, if specified * The release no longer defaults to a specific version and build, instead, the Splunk package resource defaults ensure to 'installed' * Added a Splunk::Release type * Added a service_ensure param, per voxpupuli#249 * Modified splunk*_version facts to be part of splunkforwarder and splunkenterprise fact hashes * Removed init.pp, which only served to confuse * `$[enterprise,forwarder]_package_src` and `$package_source` params renamed to `$managed_package_source` and `$unmanaged_package_source`, for clarity * Fixed: enterprise and forwarder password classes cross-referenced params Fixes voxpupuli#230 Fixes voxpupuli#232 Fixes voxpupuli#235 Fixes voxpupuli#249
- Loading branch information
1 parent
6e54f1a
commit 14a596e
Showing
36 changed files
with
1,047 additions
and
926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
splunk::enterprise::manage_password: false | ||
splunk::enterprise::seed_password: false | ||
splunk::enterprise::reset_seeded_password: false | ||
splunk::enterprise::secret: 'hhy9DOGqli4.aZWCuGvz8stcqT2/OSJUZuyWHKc4wnJtQ6IZu2bfjeElgYmGHN9RWIT3zs5hRJcX1wGerpMNObWhFue78jZMALs3c3Mzc6CzM98/yGYdfcvWMo1HRdKn82LVeBJI5dNznlZWfzg6xdywWbeUVQZcOZtODi10hdxSJ4I3wmCv0nmkSWMVOEKHxti6QLgjfuj/MOoh8.2pM0/CqF5u6ORAzqFZ8Qf3c27uVEahy7ShxSv2K4K41z' | ||
splunk::enterprise::password_hash: '$6$pIE/xAyP9mvBaewv$4GYFxC0SqonT6/x8qGcZXVCRLUVKODj9drDjdu/JJQ/Iw0Gg.aTkFzCjNAbaK4zcCHbphFz1g1HK18Z2bI92M0' | ||
splunk::enterprise::password_content: ":admin:${password_hash}::Administrator:admin:changeme@example.com::" | ||
splunk::enterprise::manage_package_source: true | ||
splunk::enterprise::src_root: 'https://download.splunk.com' | ||
splunk::enterprise::service_ensure: 'running' | ||
splunk::enterprise::splunkd_port: 8089 | ||
splunk::enterprise::logging_port: 9997 | ||
splunk::enterprise::web_httpport: 8000 | ||
splunk::enterprise::server: 'splunk' | ||
splunk::enterprise::boot_start: true | ||
splunk::enterprise::use_default_config: true | ||
splunk::enterprise::input_default_host: "${facts.fqdn}" | ||
splunk::enterprise::input_connection_host: 'dns' | ||
splunk::enterprise::splunkd_listen: '127.0.0.1' | ||
splunk::enterprise::purge_alert_actions: false | ||
splunk::enterprise::purge_authentication: false | ||
splunk::enterprise::purge_authorize: false | ||
splunk::enterprise::purge_deploymentclient: false | ||
splunk::enterprise::purge_distsearch: false | ||
splunk::enterprise::purge_indexes: false | ||
splunk::enterprise::purge_inputs: false | ||
splunk::enterprise::purge_limits: false | ||
splunk::enterprise::purge_outputs: false | ||
splunk::enterprise::purge_props: false | ||
splunk::enterprise::purge_server: false | ||
splunk::enterprise::purge_serverclass: false | ||
splunk::enterprise::purge_transforms: false | ||
splunk::enterprise::purge_uiprefs: false | ||
splunk::enterprise::purge_web: false | ||
|
||
splunk::forwarder::server: 'splunk' | ||
splunk::forwarder::service_ensure: 'running' | ||
splunk::forwarder::manage_package_source: true | ||
splunk::forwarder::src_root: 'https://download.splunk.com' | ||
splunk::forwarder::boot_start: true | ||
splunk::forwarder::use_default_config: true | ||
splunk::forwarder::splunkd_listen: '127.0.0.1' | ||
splunk::forwarder::splunkd_port: 8089 | ||
splunk::forwarder::logging_port: 9997 | ||
splunk::forwarder::purge_deploymentclient: false | ||
splunk::forwarder::purge_outputs: false | ||
splunk::forwarder::purge_inputs: false | ||
splunk::forwarder::purge_props: false | ||
splunk::forwarder::purge_transforms: false | ||
splunk::forwarder::purge_web: false | ||
splunk::forwarder::manage_password: false | ||
splunk::forwarder::seed_password: false | ||
splunk::forwarder::reset_seeded_password: false | ||
splunk::forwarder::secret: 'hhy9DOGqli4.aZWCuGvz8stcqT2/OSJUZuyWHKc4wnJtQ6IZu2bfjeElgYmGHN9RWIT3zs5hRJcX1wGerpMNObWhFue78jZMALs3c3Mzc6CzM98/yGYdfcvWMo1HRdKn82LVeBJI5dNznlZWfzg6xdywWbeUVQZcOZtODi10hdxSJ4I3wmCv0nmkSWMVOEKHxti6QLgjfuj/MOoh8.2pM0/CqF5u6ORAzqFZ8Qf3c27uVEahy7ShxSv2K4K41z' | ||
splunk::forwarder::password_hash: '$6$pIE/xAyP9mvBaewv$4GYFxC0SqonT6/x8qGcZXVCRLUVKODj9drDjdu/JJQ/Iw0Gg.aTkFzCjNAbaK4zcCHbphFz1g1HK18Z2bI92M0' | ||
splunk::forwarder::password_content: ":admin:${password_hash}::Administrator:admin:changeme@example.com::" | ||
splunk::forwarder::addons: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
|
||
splunk::enterprise::package_name: 'splunk' | ||
splunk::enterprise::splunk_user: 'root' | ||
splunk::enterprise::staging_dir: '/opt/staging/splunk' | ||
splunk::enterprise::homedir: '/opt/splunk' | ||
splunk::enterprise::path_delimiter: '/' | ||
splunk::enterprise::seed_config_file: "%{lookup('splunk::enterprise::homedir')}/etc/system/local/user-seed.conf" | ||
splunk::enterprise::password_config_file: "%{lookup('splunk::enterprise::homedir')}/etc/passwd" | ||
splunk::enterprise::secret_file: "%{lookup('splunk::enterprise::homedir')}/etc/splunk.secret" | ||
splunk::enterprise::confdir: "%{lookup('splunk::enterprise::homedir')}/etc" | ||
splunk::enterprise::src_subdir: 'linux' | ||
splunk::enterprise::install_options: [] | ||
|
||
splunk::forwarder::package_name: 'splunkforwarder' | ||
splunk::forwarder::staging_dir: '/opt/staging/splunk' | ||
splunk::forwarder::path_delimiter: '/' | ||
splunk::forwarder::homedir: '/opt/splunkforwarder' | ||
splunk::forwarder::confdir: "%{lookup('splunk::forwarder::homedir')}/etc" | ||
splunk::forwarder::src_subdir: 'linux' | ||
splunk::forwarder::install_options: [] | ||
splunk::forwarder::splunk_user: 'root' | ||
splunk::forwarder::password_config_file: "%{lookup('splunk::forwarder::homedir')}/etc/passwd" | ||
splunk::forwarder::seed_config_file: "%{lookup('splunk::forwarder::homedir')}/etc/system/local/user-seed.conf" | ||
splunk::forwarder::secret_file: "%{lookup('splunk::forwarder::homedir')}/etc/splunk.secret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
|
||
splunk::enterprise::package_name: 'splunk' | ||
splunk::enterprise::splunk_user: 'root' | ||
splunk::enterprise::staging_dir: '/opt/staging/splunk' | ||
splunk::enterprise::homedir: '/opt/splunk' | ||
splunk::enterprise::path_delimiter: '/' | ||
splunk::enterprise::seed_config_file: "%{lookup('splunk::enterprise::homedir')}/etc/system/local/user-seed.conf" | ||
splunk::enterprise::password_config_file: "%{lookup('splunk::enterprise::homedir')}/etc/passwd" | ||
splunk::enterprise::secret_file: "%{lookup('splunk::enterprise::homedir')}/etc/splunk.secret" | ||
splunk::enterprise::confdir: "%{lookup('splunk::enterprise::homedir')}/etc" | ||
splunk::enterprise::src_subdir: 'solaris' | ||
splunk::enterprise::install_options: [] | ||
|
||
splunk::forwarder::package_name: 'splunkforwarder' | ||
splunk::forwarder::staging_dir: '/opt/staging/splunk' | ||
splunk::forwarder::path_delimiter: '/' | ||
splunk::forwarder::homedir: '/opt/splunkforwarder' | ||
splunk::forwarder::confdir: "%{lookup('splunk::forwarder::homedir')}/etc" | ||
splunk::forwarder::src_subdir: 'solaris' | ||
splunk::forwarder::install_options: [] | ||
splunk::forwarder::splunk_user: 'root' | ||
splunk::forwarder::password_config_file: "%{lookup('splunk::forwarder::homedir')}/etc/passwd" | ||
splunk::forwarder::seed_config_file: "%{lookup('splunk::forwarder::homedir')}/etc/system/local/user-seed.conf" | ||
splunk::forwarder::secret_file: "%{lookup('splunk::forwarder::homedir')}/etc/splunk.secret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
|
||
splunk::enterprise::package_name: 'Splunk Enterpirse' | ||
splunk::enterprise::splunk_user: 'Administrator' | ||
splunk::enterprise::staging_dir: "%{facts.archive_windir}\\splunk" | ||
splunk::enterprise::homedir: 'C:\\Program Files\\Splunk' | ||
splunk::enterprise::path_delimiter: '\\' | ||
splunk::enterprise::seed_config_file: "%{lookup('splunk::enterprise::homedir')}\\etc\\system\\local\\user-seed.conf" | ||
splunk::enterprise::password_config_file: "%{lookup('splunk::enterprise::homedir')}\\etc\\passwd" | ||
splunk::enterprise::confdir: "%{lookup('splunk::enterprise::homedir')}\\etc" | ||
splunk::enterprise::src_subdir: 'windows' | ||
splunk::enterprise::install_options: [ | ||
{INSTALLDIR: "%{lookup('splunk::enterprise::homedir')}"}, | ||
{SPLUNKD_PORT: "%{lookup('splunk::enterprise::splunkd_port')}"}, | ||
'ARGEETOLICENSE=Yes', | ||
'LAUNCHSPLUNK=0'] | ||
|
||
splunk::forwarder::splunk_user: 'Administrator' | ||
splunk::forwarder::package_name: 'UniversalForwarder' | ||
splunk::forwarder::staging_dir: "%{facts.archive_windir}\\splunk" | ||
splunk::forwarder::homedir: 'C:\\Program Files\\SplunkUniversalForwarder' | ||
splunk::forwarder::confdir: "%{lookup('splunk::forwarder::homedir')}\\etc" | ||
splunk::forwarder::src_subdir: 'windows' | ||
splunk::forwarder::path_delimiter: '\\' | ||
splunk::forwarder::password_config_file: "%{lookup('splunk::forwarder::homedir')}\\etc\\passwd" | ||
splunk::forwarder::seed_config_file: "%{lookup('splunk::forwarder::homedir')}\\etc\\system\\local\\user-seed.conf" | ||
splunk::forwarder::install_options: [ | ||
{INSTALLDIR: "%{lookup('splunk::forwarder::homedir')}"}, | ||
'AGREETOLICENSE=Yes', | ||
'LAUNCHSPLUNK=0', | ||
'SERVICESTARTTYPE=auto', | ||
'WINEVENTLOG_APP_ENABLE=1', | ||
'WINEVENTLOG_SEC_ENABLE=1', | ||
'WINEVENTLOG_SYS_ENABLE=1', | ||
'WINEVENTLOG_FWD_ENABLE=1', | ||
'WINEVENTLOG_SET_ENABLE=1', | ||
'ENABLEADMON=1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
splunk::enterprise::package_provider: 'dpkg' | ||
|
||
splunk::forwarder::package_provider: 'dpkg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
splunk::enterprise::package_provider: 'rpm' | ||
|
||
splunk::forwarder::package_provider: 'rpm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
splunk::enterprise::package_provider: 'sun' | ||
|
||
splunk::forwarder::package_provider: 'sun' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
splunk::enterprise::package_provider: 'windows' | ||
|
||
splunk::forwarder::package_provider: 'windows' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
version: 5 | ||
|
||
defaults: | ||
datadir: data | ||
data_hash: yaml_data | ||
|
||
hierarchy: | ||
- name: "OS family" | ||
path: "os/%{facts.os.family}.yaml" | ||
|
||
- name: "Kernel" | ||
path: "kernel/%{facts.kernel}.yaml" | ||
|
||
- name: "common" | ||
path: "common.yaml" |
11 changes: 6 additions & 5 deletions
11
lib/facter/splunk_version.rb → lib/facter/splunkenterprise.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
Facter.add(:splunk_version) do | ||
Facter.add(:splunkenterprise) do | ||
setcode do | ||
value = nil | ||
splunk_hash = {} | ||
cmd = if File.exist?('C:/Program Files/Splunk/bin/splunk.exe') | ||
'"C:/Program Files/Splunk/bin/splunk.exe" --version' | ||
elsif File.exist?('/opt/splunk/bin/splunk') | ||
'/opt/splunk/bin/splunk --version' | ||
end | ||
if cmd | ||
output = Facter::Util::Resolution.exec(cmd) | ||
if output =~ %r{^Splunk ([0-9\.]+) \(} # rubocop:disable Style/IfUnlessModifier | ||
value = Regexp.last_match(1) | ||
if output =~ %r{^Splunk ([0-9\.]+) \(build\s*(.*)\)} | ||
splunk_hash['version'] = Regexp.last_match(1) | ||
splunk_hash['build'] = Regexp.last_match(2) | ||
end | ||
end | ||
value | ||
splunk_hash | ||
end | ||
end |
11 changes: 6 additions & 5 deletions
11
lib/facter/splunkforwarder_version.rb → lib/facter/splunkforwarder.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
Facter.add(:splunkforwarder_version) do | ||
Facter.add(:splunkforwarder) do | ||
setcode do | ||
value = nil | ||
splunkforwarder_hash = {} | ||
cmd = if File.exist?('C:/Program Files/SplunkUniversalForwarder/bin/splunk.exe') | ||
'"C:/Program Files/SplunkUniversalForwarder/bin/splunk.exe" --version' | ||
elsif File.exist?('/opt/splunkforwarder/bin/splunk') | ||
'/opt/splunkforwarder/bin/splunk --version' | ||
end | ||
if cmd | ||
output = Facter::Util::Resolution.exec(cmd) | ||
if output =~ %r{^Splunk Universal Forwarder ([0-9\.]+) \(} | ||
value = Regexp.last_match(1) | ||
if output =~ %r{^Splunk Universal Forwarder ([0-9\.]+) \(build\s*(.*)\)} | ||
splunkforwarder_hash['version'] = Regexp.last_match(1) | ||
splunkforwarder_hash['build'] = Regexp.last_match(2) | ||
end | ||
end | ||
value | ||
splunkforwarder_hash | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.