mount repo dir in container same as defined on host

This commit is contained in:
m0duspwnens
2022-01-26 13:42:56 -05:00
parent e77648c475
commit c80adc0430
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 %}