summaryrefslogtreecommitdiff
path: root/sitemodules
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-07-28 19:48:59 +0200
committerJan Dittberner <jandd@cacert.org>2019-07-28 19:48:59 +0200
commitb1db85776ec50e099c62b5a4ce61183d7db2c3de (patch)
tree9ae9eef684748e1f459ce87ddfe58db91c40900e /sitemodules
parent3cb0542518ddf78d706df5f9a541845184cfd209 (diff)
downloadcacert-puppet-b1db85776ec50e099c62b5a4ce61183d7db2c3de.tar.gz
cacert-puppet-b1db85776ec50e099c62b5a4ce61183d7db2c3de.tar.xz
cacert-puppet-b1db85776ec50e099c62b5a4ce61183d7db2c3de.zip
Try to improve icinga agent profile
Enforce order of master certificate installation to avoid issues with certificate enrollment during API activation.
Diffstat (limited to 'sitemodules')
-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':