]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/base_installation/manifests/puppet.pp
Add a safeguard when ldap is not available after install
[perso/Immae/Projets/Puppet.git] / 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"),