Fixes
Change-Id: I2992d1543bd09542239eefd9fd23434f1f374df2
This commit is contained in:
parent
a89a9c1065
commit
4931237ebc
2 changed files with 13 additions and 14 deletions
|
@ -1,5 +1,4 @@
|
||||||
{%- from "grafana/map.jinja" import collector with context %}
|
{%- if pillar.get('grafana', {}).get('collector', {}).get('enabled', False) %}
|
||||||
{%- if collector.get('enabled', False) %}
|
|
||||||
|
|
||||||
# This state is only used to map grains.collector pillar. Grains are now
|
# This state is only used to map grains.collector pillar. Grains are now
|
||||||
# managed from salt.minion.grains so we will just include it in case it's
|
# managed from salt.minion.grains so we will just include it in case it's
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
grain:
|
|
||||||
{%- if pillar.grafana.collector is defined %}
|
{%- if pillar.grafana.collector is defined %}
|
||||||
{%- if collector.get('enabled', False) %}
|
{%- if pillar.grafana.collector.get('enabled', False) %}
|
||||||
{%- set service_grains = {} %}
|
{%- set service_grains = {} %}
|
||||||
{%- for service_name, service in pillar.iteritems() %}
|
{%- for service_name, service in pillar.iteritems() %}
|
||||||
{%- if service.get('_support', {}).get('grafana', {}).get('enabled', False) %}
|
{%- if service.get('_support', {}).get('grafana', {}).get('enabled', False) %}
|
||||||
|
@ -10,6 +9,7 @@ grain:
|
||||||
{%- set service_grains = salt['grains.filter_by']({'default': service_grains}, merge=grains_yaml) %}
|
{%- set service_grains = salt['grains.filter_by']({'default': service_grains}, merge=grains_yaml) %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
grain:
|
||||||
grafana:
|
grafana:
|
||||||
{{ service_grains|yaml(False)|indent(4) }}
|
{{ service_grains|yaml(False)|indent(4) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in a new issue