aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation/manifests/puppet.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base_installation/manifests/puppet.pp')
-rw-r--r--modules/base_installation/manifests/puppet.pp28
1 files changed, 15 insertions, 13 deletions
diff --git a/modules/base_installation/manifests/puppet.pp b/modules/base_installation/manifests/puppet.pp
index 10b3773..603a961 100644
--- a/modules/base_installation/manifests/puppet.pp
+++ b/modules/base_installation/manifests/puppet.pp
@@ -103,45 +103,47 @@ class base_installation::puppet (
103 } 103 }
104 } 104 }
105 105
106 if file("$base_installation::puppet_conf_path/host_ldap.info", "/dev/null") != "" and 106 if file("$base_installation::puppet_notifies_path/host_ldap.info", "/dev/null") != "" and
107 empty($facts["ldapvar"]) { 107 empty($facts["ldapvar"]) {
108 fail("LDAP was activated but facts are not available") 108 fail("LDAP was activated but facts are not available")
109 } 109 }
110 110
111 file { $base_installation::puppet_notifies_path:
112 ensure => directory,
113 require => [Package["puppet"], Package["gem:xmpp4r"], Package["gem:ruby-ldap"]],
114 recurse => true,
115 purge => true,
116 force => true,
117 }
118
111 $ips = lookup("ips", { 'default_value' => undef }) 119 $ips = lookup("ips", { 'default_value' => undef })
112 concat { "$base_installation::puppet_conf_path/host_ldap.info": 120 concat { "$base_installation::puppet_notifies_path/host_ldap.info":
113 ensure => "present", 121 ensure => "present",
114 mode => "0600", 122 mode => "0600",
115 require => File[$base_installation::puppet_conf_path], 123 require => File[$base_installation::puppet_notifies_path],
116 notify => Notify_refresh["notify-ldap-password"],
117 ensure_newline => true, 124 ensure_newline => true,
118 } 125 }
119 126
120 concat::fragment { "host_ldap add top": 127 concat::fragment { "host_ldap add top":
121 target => "$base_installation::puppet_conf_path/host_ldap.info", 128 target => "$base_installation::puppet_notifies_path/host_ldap.info",
122 content => template("base_installation/puppet/host_ldap_add_top.info.erb"), 129 content => template("base_installation/puppet/host_ldap_add_top.info.erb"),
123 order => "00-01", 130 order => "00-01",
124 } 131 }
125 concat::fragment { "host_ldap add bottom": 132 concat::fragment { "host_ldap add bottom":
126 target => "$base_installation::puppet_conf_path/host_ldap.info", 133 target => "$base_installation::puppet_notifies_path/host_ldap.info",
127 content => "EOF", 134 content => "EOF",
128 order => "00-99", 135 order => "00-99",
129 } 136 }
130 137
131 concat::fragment { "host_ldap mod top": 138 concat::fragment { "host_ldap mod top":
132 target => "$base_installation::puppet_conf_path/host_ldap.info", 139 target => "$base_installation::puppet_notifies_path/host_ldap.info",
133 content => template("base_installation/puppet/host_ldap_mod_top.info.erb"), 140 content => template("base_installation/puppet/host_ldap_mod_top.info.erb"),
134 order => "01-01", 141 order => "01-01",
135 } 142 }
136 concat::fragment { "host_ldap mod bottom": 143 concat::fragment { "host_ldap mod bottom":
137 target => "$base_installation::puppet_conf_path/host_ldap.info", 144 target => "$base_installation::puppet_notifies_path/host_ldap.info",
138 content => "EOF", 145 content => "EOF",
139 order => "01-99", 146 order => "01-99",
140 } 147 }
141
142 notify_refresh { "notify-ldap-password":
143 message => template("base_installation/puppet/host_ldap.info.erb"),
144 refreshonly => true
145 }
146 } 148 }
147} 149}