From: Ismaƫl Bouya Date: Wed, 27 Mar 2019 12:06:36 +0000 (+0100) Subject: Add multiple targets for xmpp notification X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=commitdiff_plain;h=39d27c310d87131efd2e01e0c407042a9db36f5b Add multiple targets for xmpp notification --- diff --git a/external_modules/xmpp b/external_modules/xmpp index d18dd07..97a7081 160000 --- a/external_modules/xmpp +++ b/external_modules/xmpp @@ -1 +1 @@ -Subproject commit d18dd07ffdf6c33942bd0c277cb24aafa513cbd7 +Subproject commit 97a708139ecd0f2b12bee71a52aebf7f661d48cd diff --git a/modules/base_installation/templates/puppet/xmpp.yaml.erb b/modules/base_installation/templates/puppet/xmpp.yaml.erb index 572f472..8aca285 100644 --- a/modules/base_installation/templates/puppet/xmpp.yaml.erb +++ b/modules/base_installation/templates/puppet/xmpp.yaml.erb @@ -1,6 +1,13 @@ :xmpp_password: "<%= @xmpp["password"] %>" :xmpp_jid: "<%= @xmpp["jid"] %>/<%= @real_hostname %>" -:xmpp_target: "<%= @xmpp["target"] %>" +:xmpp_target: +<% if @xmpp["target"].is_a?(String) %> + - "<%= @xmpp["target"] %>" +<% else %> +<% @xmpp["target"].each do |target| %> + - "<%= target %>" +<% end %> +<% end %> <% if @xmpp["statuses"].is_a?(String) %> :xmpp_statuses: "<%= @xmpp["statuses"] %>" <% else %>