]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Add a safeguard when ldap is not available after install
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 28 Apr 2018 13:00:49 +0000 (15:00 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 28 Apr 2018 13:00:49 +0000 (15:00 +0200)
modules/base_installation/manifests/puppet.pp

index fa2db6920dcbad5089f6726b22a418c5e76d5b44..3ca226ae404af45715fc03e74f50dcea7e5ce731 100644 (file)
@@ -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"),