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:
parent
a927d2162c
commit
6306087672
3 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{%- from "grafana/map.jinja" import server with context %}
|
||||
{%- if server.enabled %}
|
||||
{%- if server.get('enabled', False) %}
|
||||
|
||||
grafana_packages:
|
||||
pkg.installed:
|
||||
|
|
Loading…
Reference in a new issue