use elastic map file

This commit is contained in:
m0duspwnens
2021-05-24 15:14:05 -04:00
parent e2d5102a0e
commit a4226cc39a
7 changed files with 24 additions and 28 deletions

View File

@@ -2,8 +2,7 @@
{% if sls in allowed_states %}
{% set role = grains.id.split('_') | last %}
{% set ELASTICUSER = salt['pillar.get']('elasticsearch:auth:user', '' ) %}
{% set ELASTICPASS = salt['pillar.get']('elasticsearch:auth:pass', '' ) %}
{% from 'elasticsearch/auth.map.jinja' import ELASTICAUTH with context %}
# Remove variables.txt from /tmp - This is temp
rmvariablesfile:
@@ -181,11 +180,7 @@ utilsyncscripts:
- template: jinja
- source: salt://common/tools/sbin
- defaults:
ELASTICCURL: "curl"
{% if salt['pillar.get']('elasticsearch:auth_enabled', False) %}
- context:
ELASTICCURL: "curl --user {{ELASTICUSER}}:{{ELASTICPASS}}"
{% endif %}
ELASTICCURL: {{ ELASTICAUTH.elasticcurl }}
{% if role in ['eval', 'standalone', 'sensor', 'heavynode'] %}