mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
starting es pillarization
This commit is contained in:
5
salt/elasticsearch/config.map.jinja
Normal file
5
salt/elasticsearch/config.map.jinja
Normal file
@@ -0,0 +1,5 @@
|
||||
{% import_yaml 'elasticsearch/defaults.yaml' as ESCONFIG %}
|
||||
|
||||
{% if not salt['pillar.get']('elasticsearch:auth:enabled', False) %}
|
||||
{% do ESCONFIG.elasticsearch.defaults.xpack.security.authc.anonymous.update({'username': 'anonymous_user', 'roles': 'superuser', 'authz_exception': 'true'}) %}
|
||||
{% endif %}
|
||||
1112
salt/elasticsearch/defaults.yaml
Normal file
1112
salt/elasticsearch/defaults.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,8 @@
|
||||
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||
{% if sls in allowed_states %}
|
||||
|
||||
|
||||
|
||||
{% set VERSION = salt['pillar.get']('global:soversion', 'HH1.2.2') %}
|
||||
{% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %}
|
||||
{% set MANAGER = salt['grains.get']('master') %}
|
||||
@@ -36,6 +38,7 @@
|
||||
|
||||
{% set TEMPLATES = salt['pillar.get']('elasticsearch:templates', {}) %}
|
||||
{% from 'elasticsearch/auth.map.jinja' import ELASTICAUTH with context %}
|
||||
{% from 'elasticsearch/config.map.jinja' import ESCONFIG with context %}
|
||||
|
||||
|
||||
vm.max_map_count:
|
||||
@@ -142,6 +145,14 @@ esyml:
|
||||
- group: 939
|
||||
- template: jinja
|
||||
|
||||
esyml_test:
|
||||
file.managed:
|
||||
- name: /tmp/elasticsearch.yml
|
||||
- source: salt://elasticsearch/files/elasticsearch.yml
|
||||
- user: 930
|
||||
- group: 939
|
||||
- contents: {{ ESCONFIG | yaml }}
|
||||
|
||||
#sync templates to /opt/so/conf/elasticsearch/templates
|
||||
{% for TEMPLATE in TEMPLATES %}
|
||||
es_template_{{TEMPLATE.split('.')[0] | replace("/","_") }}:
|
||||
|
||||
Reference in New Issue
Block a user