ES salt module - Sync config files

This commit is contained in:
Mike Reeves
2018-02-08 13:36:24 -05:00
parent ee44c54060
commit 6b155ca464
4 changed files with 84 additions and 55 deletions

View File

@@ -15,32 +15,32 @@
# Logstash Section
# Only run this is you are in the sensor role
{% if grains['role'] == 'so-sensor' %}
logstashgroup:
group.present:
- name: logstash
- gid: 931
# Add Logstash user
# Add the logstash user for the jog4j settings
logstash:
user.present:
- uid: 931
- gid: 931
- home: /opt/so/conf/logstash
# Create logstash conf directory
file.directory:
- name: /opt/so/conf/logstash
- user: 931
- group: 939
- makedirs: True
lsconfdir:
file.directory:
- name: /opt/so/conf/logstash
- user: 931
- group: 939
- makedirs: True
# Set the heap size from the sensor pillar
{% set lsheap = salt['pillar.get'](sensor:lsheap) %}
log4jfile:
file.managed:
- name: /opt/so/conf/logstash/log4j2.properties
- source: salt://logstash/files/log4j2.properties
- user: 931
- group: 939
{% else %}
# Set the heap size from the master pillar
{% set lsheap = salt['pillar.get'](master:lsheap) %}
{% endif %}
# Create the conf/d logstash directory
file.directory: