diff --git a/handlers/splunk.yml b/handlers/splunk.yml new file mode 100644 index 0000000..da08b11 --- /dev/null +++ b/handlers/splunk.yml @@ -0,0 +1,12 @@ +--- +- name: Stop Splunk + command: /opt/splunk/bin/splunk stop + become_user: splunk + +- name: Start Splunk + command: /opt/splunk/bin/splunk start + become_user: splunk + +- name: Start Splunk (No Warning) + command: /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt + become_user: splunk diff --git a/tasks/common.yml b/tasks/common.yml new file mode 100644 index 0000000..e3aaf07 --- /dev/null +++ b/tasks/common.yml @@ -0,0 +1,12 @@ +--- +- name: Stop Splunk + command: /opt/splunk/bin/splunk stop + become_user: splunk + +- name: Upgrade Splunk + unarchive: + src: "{{ splunk_archive }}" + dest: /opt/splunk + owner: splunk + group: splunk + notify: Start Splunk (No Warning)