Splunk server role

parent 820c41c0
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Defaults for role splunk-server
#
#
# vars are namespaced with the module name.
#
splunk-server_role_name: splunk-server
splunk_user: "splunk"
splunk_root: "/vol/splunk/storage"
splunk_hot_dir: "{{ splunk_root }}/hot"
splunk_thawed_dir: "{{ splunk_root }}/thawed"
splunk_cold_dir: "{{ splunk_root }}/cold"
splunk_frozen_dir: "{{ splunk_root }}/frozen"
SPLUNK_INDEXES:
- "default"
SPLUNK_VOLUMES: []
#
# OS packages
#
splunk-server_debian_pkgs: []
splunk-server_redhat_pkgs: []
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Role includes for role splunk-server
dependencies:
- role: user
user_info: "{{ COMMON_USER_INFO }}"
- role: mount_ebs
volumes: "{{ SPLUNK_VOLUMES }}"
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Tasks for role splunk-server
#
# Overview:
#
#
# Dependencies:
#
#
# Example play:
#
#
- name: Create bucket directories
file:
path: "{{ item }}"
state: directory
owner: "{{ splunk_user }}"
group: "{{ splunk_user }}"
with_items:
- "{{ splunk_hot_dir }}"
- "{{ splunk_thawed_dir }}"
- "{{ splunk_cold_dir }}"
- "{{ splunk_frozen_dir }}"
tags:
- "install"
- "install:configuration"
- name: Create configuration directory
file:
path: "{{ item }}"
state: directory
owner: "{{ splunk_user }}"
group: "{{ splunk_user }}"
with_items:
- "/opt/splunk/etc/apps/search/local"
tags:
- "install"
- "install:configuration"
- name: configure splunk buckets
template:
src: "opt/splunk/etc/apps/search/local/indexes.conf"
dest: "/opt/splunk/etc/apps/search/local/indexes.conf"
owner: "{{ splunk_user }}"
group: "{{ splunk_user }}"
mode: 0700
tags:
- "install"
- "install:configuration"
- name: restart splunk
service:
name: splunk
state: restarted
tags:
- "install"
- "install:configuration"
- "restart"
{% for name in SPLUNK_INDEXES -%}
[{{ name }}]
coldPath = {{ splunk_cold_dir }}/{{ name }}/colddb
homePath = {{ splunk_hot_dir }}/{{ name }}/db
thawedPath = {{ splunk_thawed_dir }}/{{ name }}/thaweddb
coldToFrozenDir = {{ splunk_frozen_dir }}/{{ name }}/frozendb
{%- endfor %}
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