mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #6998 from Security-Onion-Solutions/es_binds
mount repo dir in container same as defined on host
This commit is contained in:
@@ -36,11 +36,10 @@
|
|||||||
{# merge with the elasticsearch pillar #}
|
{# merge with the elasticsearch pillar #}
|
||||||
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
|
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
|
||||||
|
|
||||||
{# remove elasticsearch.config.path.repo values if a symlink /nsm/elasticsearch/repo{{ repo }} doesn't exist #}
|
|
||||||
{% 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 %}
|
||||||
{# retcode is 1 if symlink doesn't exist #}
|
{# remove elasticsearch.config.path.repo value if the directory doesn't exist on the node #}
|
||||||
{% if salt['cmd.retcode']('test -L /nsm/elasticsearch/repo'~repo) %}
|
{% if not salt['file.directory_exists'](repo) %}
|
||||||
{% do ESCONFIG.path.repo.remove(repo) %}
|
{% do ESCONFIG.path.repo.remove(repo) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ so-elasticsearch:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if ESCONFIG.path.get('repo', False) %}
|
{% if ESCONFIG.path.get('repo', False) %}
|
||||||
{% for repo in ESCONFIG.path.repo %}
|
{% for repo in ESCONFIG.path.repo %}
|
||||||
- /nsm/elasticsearch/repo{{ repo }}:{{ repo }}:rw
|
- {{ repo }}:{{ repo }}:rw
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- watch:
|
- watch:
|
||||||
|
|||||||
Reference in New Issue
Block a user