From 4b069d91abd2044d2666658b825dde99cecbb73b Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Thu, 29 Jun 2023 11:00:34 -0400 Subject: [PATCH] Check the correct pillar --- salt/elasticfleet/enabled.sls | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/salt/elasticfleet/enabled.sls b/salt/elasticfleet/enabled.sls index 17dc8afa0..2b312a536 100644 --- a/salt/elasticfleet/enabled.sls +++ b/salt/elasticfleet/enabled.sls @@ -7,15 +7,18 @@ {% if sls.split('.')[0] in allowed_states %} {% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'docker/docker.map.jinja' import DOCKER %} + +{% import_yaml 'elasticfleet/defaults.yaml' as ELASTICFLEETDEFAULTS %} +{% set ELASTICFLEETMERGED = salt['pillar.get']('elasticfleet', ELASTICFLEETDEFAULTS.elasticfleet, merge=True) %} + {# This value is generated during node install and stored in minion pillar #} {% set SERVICETOKEN = salt['pillar.get']('elasticfleet:config:server:es_token','') %} -{% set ENABLEAUTOCONFIGURATION = salt['pillar.get']('elasticfleet:config:server:enable_auto_configuration','') %} include: - elasticfleet.config - elasticfleet.sostatus -{% if ENABLEAUTOCONFIGURATION %} +{% if ELASTICFLEETMERGED.config.server.enable_auto_configuration %} so-elastic-fleet-auto-configure-logstash-outputs: cmd.run: - name: /usr/sbin/so-elastic-fleet-outputs-update