mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-26 14:37:49 +02:00
Move In Day
This commit is contained in:
@@ -1,36 +1,32 @@
|
||||
{% import_yaml 'elasticsearch/defaults.yaml' as ESCONFIG with context %}
|
||||
{% from 'logstash/map.jinja' import REDIS_NODES with context %}
|
||||
|
||||
{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %}
|
||||
|
||||
{% if not salt['pillar.get']('elasticsearch:auth:enabled', False) %}
|
||||
{% do ESCONFIG.elasticsearch.config.xpack.security.authc.anonymous.update({'username': 'anonymous_user', 'roles': 'superuser', 'authz_exception': 'true'}) %}
|
||||
{% endif %}
|
||||
|
||||
{% if salt['pillar.get']('elasticsearch:true_cluster', False) %}
|
||||
{% if grains.id.split('_') | last in ['manager','managersearch'] %}
|
||||
{% if salt['pillar.get']('nodestab', {}) %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master', 'data', 'remote_cluster_client']}) %}
|
||||
{% if HIGHLANDER %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'transform']) %}
|
||||
{% endif %}
|
||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [grains.master]}}) %}
|
||||
{% for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
||||
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(SN.split('_')|first) %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if grains.id.split('_') | last == 'manager' %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': ''}) %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['data', 'ingest']}) %}
|
||||
{% if grains.id.split('_') | last in ['manager','managersearch'] %}
|
||||
{% if REDIS_NODES | length > 1 %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master', 'data', 'remote_cluster_client']}) %}
|
||||
{% if HIGHLANDER %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'master', 'transform']) %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'transform']) %}
|
||||
{% endif %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': 'hot'}) %}
|
||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [grains.master]}}) %}
|
||||
{% for SN in REDIS_NODES.keys() %}
|
||||
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(SN) %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if HIGHLANDER %}
|
||||
{% do ESCONFIG.elasticsearch.config.xpack.ml.update({'enabled': true}) %}
|
||||
{% endif %}
|
||||
{% if grains.id.split('_') | last == 'manager' %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': ''}) %}
|
||||
{% endif %}
|
||||
{% elif grains.id.split('_') | last not in ['eval', 'standalone', 'import'] %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['data', 'ingest']}) %}
|
||||
{% if HIGHLANDER %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'master', 'transform']) %}
|
||||
{% endif %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': 'hot'}) %}
|
||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [grains.master]}}) %}
|
||||
{% endif %}
|
||||
{% if HIGHLANDER %}
|
||||
{% do ESCONFIG.elasticsearch.config.xpack.ml.update({'enabled': true}) %}
|
||||
{% endif %}
|
||||
|
||||
{# merge with the elasticsearch pillar #}
|
||||
|
||||
Reference in New Issue
Block a user