From 036a3f5ce06a3203325915b90e25f961e47d8fc0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 28 Apr 2018 15:00:49 +0200 Subject: [PATCH 1/1] Add a safeguard when ldap is not available after install --- modules/base_installation/manifests/puppet.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/base_installation/manifests/puppet.pp b/modules/base_installation/manifests/puppet.pp index fa2db69..3ca226a 100644 --- a/modules/base_installation/manifests/puppet.pp +++ b/modules/base_installation/manifests/puppet.pp @@ -95,6 +95,11 @@ class base_installation::puppet ( } } + if file("$base_installation::puppet_conf_path/host_ldap.info", "/dev/null") != "" and + empty($facts["ldapvar"]) { + fail("LDAP was activated but facts are not available") + } + $ips = lookup("ips", { 'default_value' => undef }) file { "$base_installation::puppet_conf_path/host_ldap.info": content => template("base_installation/puppet/host_ldap.info.erb"), -- 2.41.0