diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-11 12:54:22 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-11 12:54:43 +0200 |
commit | c8511b2019b44360887d33a9626ec14c81736aee (patch) | |
tree | 68826f98d5e040c34dbc249570d306664020de5c /modules/base_installation/manifests/puppet.pp | |
parent | 5a5b32d87d06cfc6dce82cf83cb023ed2764fc45 (diff) | |
download | Puppet-c8511b2019b44360887d33a9626ec14c81736aee.tar.gz Puppet-c8511b2019b44360887d33a9626ec14c81736aee.tar.zst Puppet-c8511b2019b44360887d33a9626ec14c81736aee.zip |
Add slack notification for puppet
Diffstat (limited to 'modules/base_installation/manifests/puppet.pp')
-rw-r--r-- | modules/base_installation/manifests/puppet.pp | 8 |
1 files changed, 8 insertions, 0 deletions
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 ( | |||
82 | } | 82 | } |
83 | 83 | ||
84 | $xmpp = lookup("base_installation::notify_xmpp", { "default_value" => {} }) | 84 | $xmpp = lookup("base_installation::notify_xmpp", { "default_value" => {} }) |
85 | $slack = lookup("base_installation::notify_slack", { "default_value" => {} }) | ||
85 | 86 | ||
86 | file { "$base_installation::puppet_conf_path/puppet.conf": | 87 | file { "$base_installation::puppet_conf_path/puppet.conf": |
87 | content => template("base_installation/puppet/puppet.conf.erb"), | 88 | content => template("base_installation/puppet/puppet.conf.erb"), |
@@ -95,6 +96,13 @@ class base_installation::puppet ( | |||
95 | } | 96 | } |
96 | } | 97 | } |
97 | 98 | ||
99 | unless empty($slack) { | ||
100 | file { "$base_installation::puppet_conf_path/slack.yaml": | ||
101 | content => template("base_installation/puppet/slack.yaml.erb"), | ||
102 | require => File[$base_installation::puppet_conf_path], | ||
103 | } | ||
104 | } | ||
105 | |||
98 | if file("$base_installation::puppet_conf_path/host_ldap.info", "/dev/null") != "" and | 106 | if file("$base_installation::puppet_conf_path/host_ldap.info", "/dev/null") != "" and |
99 | empty($facts["ldapvar"]) { | 107 | empty($facts["ldapvar"]) { |
100 | fail("LDAP was activated but facts are not available") | 108 | fail("LDAP was activated but facts are not available") |