aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-28 15:00:49 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-28 15:00:49 +0200
commit036a3f5ce06a3203325915b90e25f961e47d8fc0 (patch)
tree76ad6c71f45cd69f782346c3b31973d81d82eeb9 /modules/base_installation
parentacd2cd43b6fff9bcd2c7804767f838684c3cfd1e (diff)
downloadPuppet-036a3f5ce06a3203325915b90e25f961e47d8fc0.tar.gz
Puppet-036a3f5ce06a3203325915b90e25f961e47d8fc0.tar.zst
Puppet-036a3f5ce06a3203325915b90e25f961e47d8fc0.zip
Add a safeguard when ldap is not available after install
Diffstat (limited to 'modules/base_installation')
-rw-r--r--modules/base_installation/manifests/puppet.pp5
1 files changed, 5 insertions, 0 deletions
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 (
95 } 95 }
96 } 96 }
97 97
98 if file("$base_installation::puppet_conf_path/host_ldap.info", "/dev/null") != "" and
99 empty($facts["ldapvar"]) {
100 fail("LDAP was activated but facts are not available")
101 }
102
98 $ips = lookup("ips", { 'default_value' => undef }) 103 $ips = lookup("ips", { 'default_value' => undef })
99 file { "$base_installation::puppet_conf_path/host_ldap.info": 104 file { "$base_installation::puppet_conf_path/host_ldap.info":
100 content => template("base_installation/puppet/host_ldap.info.erb"), 105 content => template("base_installation/puppet/host_ldap.info.erb"),