From cdbbfd477be98497ca89233ca8b8b1c1e27e184b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 22 Mar 2018 11:50:12 +0100 Subject: XMPP notification --- modules/base_installation/manifests/puppet.pp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'modules/base_installation/manifests') diff --git a/modules/base_installation/manifests/puppet.pp b/modules/base_installation/manifests/puppet.pp index 0cb43bc..c64ddfd 100644 --- a/modules/base_installation/manifests/puppet.pp +++ b/modules/base_installation/manifests/puppet.pp @@ -56,23 +56,39 @@ class base_installation::puppet ( install_options => "--no-user-install" } + package { 'gem:xmpp4r': + name => "xmpp4r", + ensure => present, + provider => "gem", + install_options => "--no-user-install" + } + file { $password_seed: mode => "0600", } file { $base_installation::puppet_conf_path: ensure => directory, - require => [Package["puppet"], Package["gem:ruby-ldap"]], + require => [Package["puppet"], Package["gem:xmpp4r"], Package["gem:ruby-ldap"]], recurse => true, purge => true, force => true, } + $xmpp = lookup("base_installation::notify_xmpp", { "default_value" => {} }) + file { "$base_installation::puppet_conf_path/puppet.conf": content => template("base_installation/puppet/puppet.conf.erb"), require => File[$base_installation::puppet_conf_path], } + unless empty($xmpp) { + file { "$base_installation::puppet_conf_path/xmpp.yaml": + content => template("base_installation/puppet/xmpp.yaml.erb"), + require => File[$base_installation::puppet_conf_path], + } + } + $ips = lookup("ips", { 'default_value' => undef }) file { "$base_installation::puppet_conf_path/host_ldap.info": content => template("base_installation/puppet/host_ldap.info.erb"), -- cgit v1.2.3