summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sitemodules/profiles/manifests/icinga2_agent.pp5
1 files changed, 4 insertions, 1 deletions
diff --git a/sitemodules/profiles/manifests/icinga2_agent.pp b/sitemodules/profiles/manifests/icinga2_agent.pp
index 6300301..0c61ffa 100644
--- a/sitemodules/profiles/manifests/icinga2_agent.pp
+++ b/sitemodules/profiles/manifests/icinga2_agent.pp
@@ -37,7 +37,9 @@ class profiles::icinga2_agent (
) {
include 'profiles::icinga2_common'
- file { "/var/lib/icinga2/certs/trusted-cert.crt":
+ $icinga_master_cert = '/var/lib/icinga2/certs/trusted-cert.crt'
+
+ file { $icinga_master_cert:
ensure => file,
content => $master_certificate,
owner => 'nagios',
@@ -73,6 +75,7 @@ class profiles::icinga2_agent (
'endpoints' => [$master_host],
},
},
+ require => File[$icinga_master_cert],
}
icinga2::object::zone { 'global-templates':