1
0
Fork 0
mirror of synced 2024-11-25 02:05:36 -05:00

Use get function to check if a role is enabled

This patch uses the function get with False by default. This is to allow
to call a state even if the node is not classified.
This commit is contained in:
Guillaume Thouvenin 2016-11-28 12:04:11 +01:00
parent a927d2162c
commit 6306087672
3 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{%- from "grafana/map.jinja" import client with context %}
{%- if client.enabled %}
{%- if client.get('enabled', False) %}
/etc/salt/minion.d/_grafana.conf:
file.managed:

View file

@ -1,5 +1,5 @@
{%- from "grafana/map.jinja" import collector with context %}
{%- if collector.enabled %}
{%- if collector.get('enabled', False) %}
grafana_grains_dir:
file.directory:

View file

@ -1,5 +1,5 @@
{%- from "grafana/map.jinja" import server with context %}
{%- if server.enabled %}
{%- if server.get('enabled', False) %}
grafana_packages:
pkg.installed: