[submodule "modules/redis"]
path = external_modules/redis
url = git://git.immae.eu/github/arioch/puppet-redis
+[submodule "external_modules/slack"]
+ path = external_modules/slack
+ url = git://git.immae.eu/github/cegeka/puppet-slack
--- /dev/null
+Subproject commit 5abc0909a05b6665d94c63771ab81620aecc1f28
}
$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"),
}
}
+ 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")
[main]
-<% if @xmpp.count > 0 %>
-reports = store,xmpp
-<% else %>
-reports = store
-<% end %>
+<%
+ reports = ["store"]
+ if @xmpp.count > 0
+ reports << "xmpp"
+ end
+ if @slack.count > 0
+ reports << "slack"
+ end
+%>
+reports = <%= reports.join(",") %>
basemodulepath = <%= @puppet_code_path %>/modules:<%= @puppet_code_path %>/external_modules
--- /dev/null
+---
+:slack_webhook: '<%= @slack["webhook"] %>'
+:slack_channel: '<%= @slack["channel"] %>'
+:slack_username: '<%= @slack["username"] %>'
+:slack_icon_url: '<%= @slack["icon_url"] %>'
+:slack_statuses:
+<% @slack["statuses"].each do |status| %>
+ - <%= status %>
+<% end %>
+:foreman_api_host: ~
+:puppetboard_api_host: ~
+