mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
logic for truecluster to map file
This commit is contained in:
@@ -1,5 +1,31 @@
|
||||
{% import_yaml 'elasticsearch/defaults.yaml' as ESCONFIG %}
|
||||
# soup needs
|
||||
# elasticsearch:esclustername pillar move to elasticsearch:cluster_settings:cluster:name
|
||||
# move elasticsearch:true_cluster_name to elasticsearch:cluster_settings:cluster:name if true_cluster enabled
|
||||
# elasticsearch:node_route_type moved
|
||||
|
||||
{% import_yaml 'elasticsearch/defaults.yaml' as ESCONFIG with context %}
|
||||
|
||||
{% 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'}) %}
|
||||
{% do ESCONFIG.elasticsearch.cluster_settings.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', {}) %}
|
||||
{% set ESCONFIG.elasticsearch.cluster_settings.node.roles = ['master', 'data', 'remote_cluster_client'] %}
|
||||
node.roles: [ master, data, remote_cluster_client ]
|
||||
{% do ESCONFIG.elasticsearch.cluster_settings.discovery.seed_hosts.append(grains.master) %}
|
||||
{% for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
||||
{% do ESCONFIG.elasticsearch.cluster_settings.discovery.seed_hosts.append(SN.split('_')|first) %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if grains.id.split('_') | last == 'managersearch' %}
|
||||
{% do ESCONFIG.elasticsearch.cluster_settings.node.attr.update({'box_type': 'hot'}) %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set ESCONFIG.elasticsearch.cluster_settings.node.roles = ['data', 'ingest'] %}
|
||||
{% do ESCONFIG.elasticsearch.cluster_settings.node.attr.update({'box_type': 'hot'}) %}
|
||||
{% do ESCONFIG.elasticsearch.cluster_settings.discovery.seed_hosts.append(grains.master) %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
elasticsearch:
|
||||
es_port: 9200
|
||||
esheap: 4049m
|
||||
esclustername: default-cluster-name
|
||||
log_size_limit: 95 #used for curator
|
||||
|
||||
index_settings:
|
||||
|
||||
Reference in New Issue
Block a user