diff options
author | Jan Dittberner <jandd@cacert.org> | 2019-07-28 19:48:59 +0200 |
---|---|---|
committer | Jan Dittberner <jandd@cacert.org> | 2019-07-28 19:48:59 +0200 |
commit | b1db85776ec50e099c62b5a4ce61183d7db2c3de (patch) | |
tree | 9ae9eef684748e1f459ce87ddfe58db91c40900e | |
parent | 3cb0542518ddf78d706df5f9a541845184cfd209 (diff) | |
download | cacert-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.
-rw-r--r-- | sitemodules/profiles/manifests/icinga2_agent.pp | 5 |
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': |