From c8511b2019b44360887d33a9626ec14c81736aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 11 May 2018 12:54:22 +0200 Subject: Add slack notification for puppet --- modules/base_installation/manifests/puppet.pp | 8 ++++++++ 1 file changed, 8 insertions(+) (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 3ca226a..05fe9a1 100644 --- a/modules/base_installation/manifests/puppet.pp +++ b/modules/base_installation/manifests/puppet.pp @@ -82,6 +82,7 @@ class base_installation::puppet ( } $xmpp = lookup("base_installation::notify_xmpp", { "default_value" => {} }) + $slack = lookup("base_installation::notify_slack", { "default_value" => {} }) file { "$base_installation::puppet_conf_path/puppet.conf": content => template("base_installation/puppet/puppet.conf.erb"), @@ -95,6 +96,13 @@ class base_installation::puppet ( } } + unless empty($slack) { + file { "$base_installation::puppet_conf_path/slack.yaml": + content => template("base_installation/puppet/slack.yaml.erb"), + require => File[$base_installation::puppet_conf_path], + } + } + if file("$base_installation::puppet_conf_path/host_ldap.info", "/dev/null") != "" and empty($facts["ldapvar"]) { fail("LDAP was activated but facts are not available") -- cgit v1.2.3