prevent path.repo from being put in elasticsearch.yml if the symlink doesnt exist

This commit is contained in:
m0duspwnens
2022-01-25 12:57:05 -05:00
parent e62de2934c
commit 4423e93880
2 changed files with 13 additions and 5 deletions

View File

@@ -325,12 +325,9 @@ so-elasticsearch:
- /opt/so/conf/elasticsearch/users_roles:/usr/share/elasticsearch/config/users_roles:ro
- /opt/so/conf/elasticsearch/users:/usr/share/elasticsearch/config/users:ro
{% endif %}
{% if ES_PATH_REPO %}
{% for repo in ES_PATH_REPO %}
# /nsm/elasticsearch/repo{{ repo }} must exist as a symlink for the bind to be created
{% if salt['cmd.retcode']('test ! -L /nsm/elasticsearch/repo'~repo) %}
{% if ESCONFIG.path.repo %}
{% for repo in ESCONFIG.path.repo %}
- /nsm/elasticsearch/repo{{ repo }}:{{ repo }}:rw
{% endif %}
{% endfor %}
{% endif %}
- watch: