Created
March 7, 2012 06:03
-
-
Save kbarber/1991353 to your computer and use it in GitHub Desktop.
Puppet/Splunk/Windows
This file contains hidden or 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
| class splunk { | |
| file { "C:\Software": | |
| ensure => directory, | |
| }-> | |
| file { 'C:\Software\splunk-4.3.1-119532-x64-release.msi': | |
| source => "puppet:///modules/${module_name}/splunk-4.3.1-119532-x64-release.msi", | |
| }-> | |
| package { "splunk-4.3.1-119532-x64-release": | |
| source => 'C:\Software\splunk-4.3.1-119532-x64-release.msi', | |
| # See: http://docs.splunk.com/Documentation/Splunk/latest/installation/installonwindowsviathecommandline | |
| install_options => { | |
| "SPLUNKD_PORT" => 8089, | |
| "WEB_PORT" => 8000, | |
| "WINEVENTLOG_APP_ENABLE" => 1, | |
| "WINEVENTLOG_SEC_ENABLE" => 1, | |
| "WINEVENTLOG_SYS_ENABLE" => 1, | |
| "WINEVENTLOG_FWD_ENABLE" => 1, | |
| "WINEVENTLOG_SET_ENABLE" => 1, | |
| "REGISTRYCHECK_U" => 1, | |
| "REGISTRYCHECK_BASELINE_U" => 1, | |
| "REGISTRYCHECK_LM" => 1, | |
| "REGISTRYCHECK_BASELINE_LM" => 1, | |
| "WMICHECK_CPUTIME" => 1, | |
| "WMICHECK_LOCALDISK" => 1, | |
| "WMICHECK_FREEDISK" => 1, | |
| "WMICHECK_MEMORY" => 1, | |
| "LAUNCHSPLUNK" => 1, | |
| }, | |
| }-> | |
| service { "Splunkd": | |
| ensure => running, | |
| enable => true, | |
| }-> | |
| service { "Splunkweb": | |
| ensure => running, | |
| enable => true, | |
| }-> | |
| exec { "splunk-8080-fw": | |
| command => 'C:\Windows\System32\netsh.exe advfirewall firewall add rule name="Open Port 8000" dir=in action=allow protocol=TCP localport=8000', | |
| unless => 'C:\Windows\System32\netsh.exe advfirewall firewall show rule name="Open Port 8000"', | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment