{%- from 'icinga2/map.jinja' import icinga2 with context %} {%- set fqdn = salt.grains.get('fqdn') -%} {% if fqdn != icinga2.master_fqdn -%} object Endpoint "{{icinga2.master_fqdn}}" { host = "{{icinga2.master_fqdn}}" port = "5665" } object Zone "master" { endpoints = [ "{{icinga2.master_fqdn}}" ] } {%- endif %} object Endpoint NodeName { } object Zone ZoneName { endpoints = [ NodeName ] {% if fqdn != icinga2.master_fqdn -%} parent = "master" {%- endif %} }