Commit a4e12dba by Max Rothman

Enable splunk-server role to manage dashboards

parent ed7dc2c9
......@@ -64,6 +64,13 @@ SPLUNK_FIELD_EXTRACTIONS: []
# name:
# regex:
SPLUNK_DASHBOARDS: []
# A list of paths of dashboard xml.j2 templates.
# xml templates must be of the form expected by Splunk.
# For an example, create a dashboard in the Splunk UI and go to Edit > Edit Source
# e.g.
# - {{ role_path }}/../../../secure-repo/path/to/templates/template.xml.j2
SPLUNK_ALERT_DEFAULT_SEVERITY: "3"
......
......@@ -100,6 +100,25 @@
- install:configuration
when: SPLUNK_FIELD_EXTRACTIONS is defined
- name: Make dashboards directory
file:
state: directory
path: /opt/splunk/etc/apps/search/local/data/ui/views
owner: "{{ splunk_user }}"
group: "{{ splunk_user }}"
- name: configure splunk dashboards
template:
src: "{{ item }}"
dest: /opt/splunk/etc/apps/search/local/data/ui/views/{{ item.rstrip('.j2') | basename }}
owner: "{{ splunk_user }}"
group: "{{ splunk_user }}"
mode: 0700
with_items: SPLUNK_DASHBOARDS
tags:
- install
- install:configuration
- name: restart splunk
service:
name: splunk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment