proper naming and actually using the state

This commit is contained in:
2020-06-07 15:54:57 +02:00
parent 6aa516892c
commit 9315effc22
2 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,9 @@
{%
set has_promeexporter = salt['pillar.get'](
'prometheus:service:wanted',
default=False
%}
{% {%
set has_fan = salt['pillar.get']( set has_fan = salt['pillar.get'](
'hardware:raspberrypi:fan:has_fan', 'hardware:raspberrypi:fan:has_fan',
@@ -6,7 +11,10 @@ set has_fan = salt['pillar.get'](
) )
%} %}
{%- if has_fan %}
include: include:
{%- if 'node_exporter' in has_promexporter %}
- .prometheus-exporter
{%- endif %}
{%- if has_fan %}
- .fan - .fan
{%- endif %} {%- endif %}