diff --git a/smokeping/files/Alerts b/smokeping/files/Alerts index edd0a38..f83242f 100644 --- a/smokeping/files/Alerts +++ b/smokeping/files/Alerts @@ -4,10 +4,10 @@ to = {{ salt['pillar.get']('smokeping:alerts:to', 'alertee@address.somewhere') }} from = {{ salt['pillar.get']('smokeping:alerts:from', 'smokealert@company.xy') }} -{% for alert, options in smokeping.alerts.iteritems() -%} +{% for alert, options in smokeping.alerts.items() -%} {% if options is mapping() %} + {{ alert }} -{% for key, value in options.iteritems() -%} +{% for key, value in options.items() -%} {{ key }} = {{ value }} {% endfor %} diff --git a/smokeping/files/Probes b/smokeping/files/Probes index fa1e5b3..55dc96a 100644 --- a/smokeping/files/Probes +++ b/smokeping/files/Probes @@ -1,7 +1,7 @@ {%- from "smokeping/map.jinja" import smokeping with context -%} *** Probes *** -{% for probe, settings in smokeping.probes.iteritems() %} +{% for probe, settings in smokeping.probes.items() %} + {{ probe }} {% for key, value in settings.items() %} {{ key }} = {{ value }} diff --git a/smokeping/files/Targets b/smokeping/files/Targets index 7aaac0e..4a37928 100644 --- a/smokeping/files/Targets +++ b/smokeping/files/Targets @@ -8,11 +8,11 @@ title = {{ smokeping.targets.title }} remark = {{ salt['pillar.get']('smokeping:targets:remark', '') }} alerts = {{ salt['pillar.get']('smokeping:targets:alerts', '') }} -{% for target, options in smokeping.targets.iteritems() -%} +{% for target, options in smokeping.targets.items() -%} {% if options is mapping() -%} + {{ target }} -{% for key, value in options.iteritems() -%} +{% for key, value in options.items() -%} {{ key }} = {{ value }} {% endfor %}