mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Merge pull request #8708 from Security-Onion-Solutions/funstuff
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
{% import_yaml 'elastalert/defaults.yaml' as ELASTALERT with context %}
|
{% import_yaml 'elastalert/defaults.yaml' as ELASTALERT with context %}
|
||||||
{% set elastalert_pillar = salt['pillar.get']('elastalert:config', {}) %}
|
{% set elastalert_pillar = salt['pillar.get']('elastalert:config', {}) %}
|
||||||
|
|
||||||
{% do salt['defaults.merge'](ELASTALERT.elastalert.config, elastalert_pillar, in_place=True) %}
|
|
||||||
|
|
||||||
{% do ELASTALERT.elastalert.config.update({'es_host': pillar.global.managerip}) %}
|
{% do ELASTALERT.elastalert.config.update({'es_host': pillar.global.managerip}) %}
|
||||||
{% do ELASTALERT.elastalert.config.update({'es_username': pillar.elasticsearch.auth.users.so_elastic_user.user}) %}
|
{% do ELASTALERT.elastalert.config.update({'es_username': pillar.elasticsearch.auth.users.so_elastic_user.user}) %}
|
||||||
{% do ELASTALERT.elastalert.config.update({'es_password': pillar.elasticsearch.auth.users.so_elastic_user.pass}) %}
|
{% do ELASTALERT.elastalert.config.update({'es_password': pillar.elasticsearch.auth.users.so_elastic_user.pass}) %}
|
||||||
|
|
||||||
|
{% do salt['defaults.merge'](ELASTALERT.elastalert.config, elastalert_pillar, in_place=True) %}
|
||||||
|
|
||||||
|
|||||||
@@ -29,12 +29,13 @@
|
|||||||
{% do ESCONFIG.elasticsearch.config.xpack.ml.update({'enabled': true}) %}
|
{% do ESCONFIG.elasticsearch.config.xpack.ml.update({'enabled': true}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# merge with the elasticsearch pillar #}
|
|
||||||
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
|
|
||||||
{% do ESCONFIG.elasticsearch.config.node.update({'name': grains.host}) %}
|
{% do ESCONFIG.elasticsearch.config.node.update({'name': grains.host}) %}
|
||||||
{% do ESCONFIG.elasticsearch.config.cluster.update({'name': grains.host}) %}
|
{% do ESCONFIG.elasticsearch.config.cluster.update({'name': grains.host}) %}
|
||||||
{% do ESCONFIG.elasticsearch.config.transport.update({'publish_host': grains.host}) %}
|
{% do ESCONFIG.elasticsearch.config.transport.update({'publish_host': grains.host}) %}
|
||||||
|
|
||||||
|
{# merge with the elasticsearch pillar #}
|
||||||
|
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
|
||||||
|
|
||||||
{% if salt['pillar.get']('elasticsearch:config:path:repo', False) %}
|
{% if salt['pillar.get']('elasticsearch:config:path:repo', False) %}
|
||||||
{% for repo in pillar.elasticsearch.config.path.repo %}
|
{% for repo in pillar.elasticsearch.config.path.repo %}
|
||||||
{# remove elasticsearch.config.path.repo value if the directory doesn't exist on the node #}
|
{# remove elasticsearch.config.path.repo value if the directory doesn't exist on the node #}
|
||||||
|
|||||||
Reference in New Issue
Block a user