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:
Josh Patterson
2022-01-26 13:59:17 -05:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -36,11 +36,10 @@
{# merge with the elasticsearch pillar #}
{% 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) %}
{% for repo in pillar.elasticsearch.config.path.repo %}
{# retcode is 1 if symlink doesn't exist #}
{% if salt['cmd.retcode']('test -L /nsm/elasticsearch/repo'~repo) %}
{# remove elasticsearch.config.path.repo value if the directory doesn't exist on the node #}
{% if not salt['file.directory_exists'](repo) %}
{% do ESCONFIG.path.repo.remove(repo) %}
{% endif %}
{% endfor %}

View File

@@ -326,7 +326,7 @@ so-elasticsearch:
{% endif %}
{% if ESCONFIG.path.get('repo', False) %}
{% for repo in ESCONFIG.path.repo %}
- /nsm/elasticsearch/repo{{ repo }}:{{ repo }}:rw
- {{ repo }}:{{ repo }}:rw
{% endfor %}
{% endif %}
- watch: