X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=blobdiff_plain;f=modules%2Fbase_installation%2Fmanifests%2Fpuppet.pp;h=603a96115b97493f9f4d71af639c059ed6537c60;hp=10b3773041bd7b54356243546340eb76f2c1f05c;hb=a7b985dd3cc4af68875733eb135335a31504f472;hpb=7dc85dc776e158e26202362f11a72d7491ef07c8 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 ( } } - if file("$base_installation::puppet_conf_path/host_ldap.info", "/dev/null") != "" and + if file("$base_installation::puppet_notifies_path/host_ldap.info", "/dev/null") != "" and empty($facts["ldapvar"]) { fail("LDAP was activated but facts are not available") } + file { $base_installation::puppet_notifies_path: + ensure => directory, + require => [Package["puppet"], Package["gem:xmpp4r"], Package["gem:ruby-ldap"]], + recurse => true, + purge => true, + force => true, + } + $ips = lookup("ips", { 'default_value' => undef }) - concat { "$base_installation::puppet_conf_path/host_ldap.info": + concat { "$base_installation::puppet_notifies_path/host_ldap.info": ensure => "present", mode => "0600", - require => File[$base_installation::puppet_conf_path], - notify => Notify_refresh["notify-ldap-password"], + require => File[$base_installation::puppet_notifies_path], ensure_newline => true, } concat::fragment { "host_ldap add top": - target => "$base_installation::puppet_conf_path/host_ldap.info", + target => "$base_installation::puppet_notifies_path/host_ldap.info", content => template("base_installation/puppet/host_ldap_add_top.info.erb"), order => "00-01", } concat::fragment { "host_ldap add bottom": - target => "$base_installation::puppet_conf_path/host_ldap.info", + target => "$base_installation::puppet_notifies_path/host_ldap.info", content => "EOF", order => "00-99", } concat::fragment { "host_ldap mod top": - target => "$base_installation::puppet_conf_path/host_ldap.info", + target => "$base_installation::puppet_notifies_path/host_ldap.info", content => template("base_installation/puppet/host_ldap_mod_top.info.erb"), order => "01-01", } concat::fragment { "host_ldap mod bottom": - target => "$base_installation::puppet_conf_path/host_ldap.info", + target => "$base_installation::puppet_notifies_path/host_ldap.info", content => "EOF", order => "01-99", } - - notify_refresh { "notify-ldap-password": - message => template("base_installation/puppet/host_ldap.info.erb"), - refreshonly => true - } } }