-
-
Save ekristen/f6c0cfd5bf5add25aa2b to your computer and use it in GitHub Desktop.
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
splunkforwarder: | |
pkg.installed: | |
- sources: | |
- splunkforwarder: salt://resources/splunkforwarder-6.0.1-189883-linux-2.6-amd64.deb | |
splunk_enable_boot: | |
cmd.run: | |
- name: /opt/splunkforwarder/bin/splunk enable boot-start --no-prompt --answer-yes --accept-license | |
- unless: /usr/sbin/update-rc.d -n splunk defaults|grep 'already exist' | |
- require: | |
- pkg: splunkforwarder | |
splunk_deploy_poll: | |
cmd.run: | |
- name: /opt/splunkforwarder/bin/splunk set deploy-poll {{ pillar['splunk']['deployment']['host'] }}:{{ pillar['splunk']['deployment']['port'] }} | |
- unless: /opt/splunkforwarder/bin/splunk list deploy-poll -auth {{ pillar['splunk']['forwarder']['user'] }}:{{ pillar['splunk']['forwarder']['password'] }} | grep "{{ pillar['splunk']['deployment']['host'] }}:{{ pillar['splunk']['deployment']['port'] }}" | |
- require: | |
- cmd: splunk_enable_boot | |
splunk_start: | |
cmd.run: | |
- name: /opt/splunkforwarder/bin/splunk start --no-prompt --answer-yes --accept-license | |
- unless: /usr/bin/pgrep -f 'splunkd' | |
- require: | |
- cmd: splunk_deploy_poll |
gravyboat
commented
Jan 7, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment