summaryrefslogtreecommitdiff
path: root/sitemodules
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-07-21 13:59:03 +0200
committerJan Dittberner <jandd@cacert.org>2019-07-21 13:59:03 +0200
commitce7a64306015bfab03666068ce1407cf0195d693 (patch)
treeb3b88d49dfc86962bb531edcf060f8b6a8b6c6b0 /sitemodules
parent7acdbe410bc6ab956272c701459a120e04e306c2 (diff)
downloadcacert-puppet-ce7a64306015bfab03666068ce1407cf0195d693.tar.gz
cacert-puppet-ce7a64306015bfab03666068ce1407cf0195d693.tar.xz
cacert-puppet-ce7a64306015bfab03666068ce1407cf0195d693.zip
Add exported zone and endpoint for icinga2 agent
Diffstat (limited to 'sitemodules')
-rw-r--r--sitemodules/profiles/manifests/icinga2_agent.pp14
1 files changed, 14 insertions, 0 deletions
diff --git a/sitemodules/profiles/manifests/icinga2_agent.pp b/sitemodules/profiles/manifests/icinga2_agent.pp
index fbb2dc7..9b4fec5 100644
--- a/sitemodules/profiles/manifests/icinga2_agent.pp
+++ b/sitemodules/profiles/manifests/icinga2_agent.pp
@@ -55,4 +55,18 @@ class profiles::icinga2_agent (
],
}
Exec['/bin/sh /var/lib/icinga2/setup_agent.sh'] ~> Service<| name == 'icinga2' |>
+
+ @@icinga2::object::endpoint {
+ ensure => present,
+ endpoint_name => $::fqdn,
+ target => "/etc/icinga2/zones.d/${::fqdn}.conf",
+ }
+
+ @@icinga2::object::zone {
+ ensure => present,
+ zone_name => $::fqdn,
+ endpoints => [$::fqdn],
+ parent => $::profiles::icinga2_common::master_host,
+ target => "/etc/icinga2/zones.d/${::fqdn}.conf",
+ }
}