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