From a7b985dd3cc4af68875733eb135335a31504f472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 17 Aug 2018 12:51:33 +0200 Subject: Add cat_files report to notify of important changes --- modules/base_installation/manifests/puppet.pp | 28 ++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'modules/base_installation/manifests/puppet.pp') 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 - } } } -- cgit v1.2.3