aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation/manifests/puppet.pp
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-08-18 19:30:29 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-08-18 19:30:29 +0200
commited7b09a7b7c88c49e4fddb8cbe49e6a4ce6bce10 (patch)
tree3819efff8336fdda1fef8fc78fd2fbc0791693af /modules/base_installation/manifests/puppet.pp
parentb84916dd6c1bd5db098ecdd86f3f60ce22d1c1d6 (diff)
parent6667f52e8017065c9b5f14c8025458b38029a800 (diff)
downloadPuppet-ed7b09a7b7c88c49e4fddb8cbe49e6a4ce6bce10.tar.gz
Puppet-ed7b09a7b7c88c49e4fddb8cbe49e6a4ce6bce10.tar.zst
Puppet-ed7b09a7b7c88c49e4fddb8cbe49e6a4ce6bce10.zip
Merge branch 'dev'
Diffstat (limited to 'modules/base_installation/manifests/puppet.pp')
-rw-r--r--modules/base_installation/manifests/puppet.pp42
1 files changed, 34 insertions, 8 deletions
diff --git a/modules/base_installation/manifests/puppet.pp b/modules/base_installation/manifests/puppet.pp
index 05fe9a1..603a961 100644
--- a/modules/base_installation/manifests/puppet.pp
+++ b/modules/base_installation/manifests/puppet.pp
@@ -103,21 +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 file { "$base_installation::puppet_conf_path/host_ldap.info": 120 concat { "$base_installation::puppet_notifies_path/host_ldap.info":
113 content => template("base_installation/puppet/host_ldap.info.erb"), 121 ensure => "present",
114 require => File[$base_installation::puppet_conf_path], 122 mode => "0600",
115 notify => Notify_refresh["notify-ldap-password"], 123 require => File[$base_installation::puppet_notifies_path],
124 ensure_newline => true,
125 }
126
127 concat::fragment { "host_ldap add top":
128 target => "$base_installation::puppet_notifies_path/host_ldap.info",
129 content => template("base_installation/puppet/host_ldap_add_top.info.erb"),
130 order => "00-01",
131 }
132 concat::fragment { "host_ldap add bottom":
133 target => "$base_installation::puppet_notifies_path/host_ldap.info",
134 content => "EOF",
135 order => "00-99",
116 } 136 }
117 137
118 notify_refresh { "notify-ldap-password": 138 concat::fragment { "host_ldap mod top":
119 message => template("base_installation/puppet/host_ldap.info.erb"), 139 target => "$base_installation::puppet_notifies_path/host_ldap.info",
120 refreshonly => true 140 content => template("base_installation/puppet/host_ldap_mod_top.info.erb"),
141 order => "01-01",
142 }
143 concat::fragment { "host_ldap mod bottom":
144 target => "$base_installation::puppet_notifies_path/host_ldap.info",
145 content => "EOF",
146 order => "01-99",
121 } 147 }
122 } 148 }
123} 149}