From: Stephen Gran Date: Thu, 2 Jan 2014 22:16:13 +0000 (+0000) Subject: In ruby, this must be an array X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=commitdiff_plain;h=982d174bebad533fcc0998a120ef541263bfc53c In ruby, this must be an array Signed-off-by: Stephen Gran --- diff --git a/modules/exim/templates/manualroute.erb b/modules/exim/templates/manualroute.erb index 430a4bf9..899f1d99 100644 --- a/modules/exim/templates/manualroute.erb +++ b/modules/exim/templates/manualroute.erb @@ -12,7 +12,7 @@ mxmatches = [ @fqdn ] routes = [] extraroutes = [] -if scope.function_has_role('mailrelay') +if scope.function_has_role(['mailrelay']) mxmatches << 'mailout.debian.org' mxmatches << 'INCOMING-MX' extraroutes = [ "keyring.debian.org:\t\tkaufmann.debian.org" ] diff --git a/modules/ferm/templates/me.conf.erb b/modules/ferm/templates/me.conf.erb index ea1b8785..7b960e71 100644 --- a/modules/ferm/templates/me.conf.erb +++ b/modules/ferm/templates/me.conf.erb @@ -44,11 +44,11 @@ if restrict_ssh.include?(hostname) then ssh6allowed << "2001:41c8:1000:21::21:5" # adayevskaya end - if scope.function_has_role('static_master') then + if scope.function_has_role(['static_master']) then ssh4allowed << '$HOST_STATIC_V4' ssh6allowed << '$HOST_STATIC_V6' - elsif scope.function_has_role('static_source') or - scope.function_has_role('static_mirror') then + elsif scope.function_has_role(['static_source']) or + scope.function_has_role(['static_mirror']) then ssh4allowed << '$HOST_STATICMASTER_V4' ssh6allowed << '$HOST_STATICMASTER_V6' end diff --git a/modules/samhain/templates/samhainrc.erb b/modules/samhain/templates/samhainrc.erb index c76164cc..b0e89656 100644 --- a/modules/samhain/templates/samhainrc.erb +++ b/modules/samhain/templates/samhainrc.erb @@ -143,7 +143,7 @@ file=/etc/nagios file=/etc/nagios/nrpe.d file=/etc/nagios/obsolete-packages-ignore.d file=/etc/bind/geodns -<% if scope.function_has_role('nagiosmaster') -%> +<% if scope.function_has_role(['nagiosmaster']) -%> file=/etc/nagios3/puppetconf.d <% end -%> file=/etc/puppet @@ -165,7 +165,7 @@ file=/etc/rc.local file=/etc/unbound file=/etc/dsa file=/etc/rabbitmq -<% if scope.function_has_role('static_mirror') or scope.function_has_role('static_source') or scope.function_has_role('static_master') -%> +<% if scope.function_has_role(['static_mirror']) or scope.function_has_role(['static_source']) or scope.function_has_role(['static_master']) -%> file=/etc/ssh/userkeys file=/etc/ssh/userkeys/staticsync <% end -%> @@ -232,7 +232,7 @@ file=/var/log/syslog ## This file might be created or removed by the system sometimes. ## file=/etc/resolv.conf -<% if scope.function_has_role('buildd') -%> +<% if scope.function_has_role(['buildd']) -%> file=/etc/dupload.conf <% end -%> file=/etc/resolv.conf.pcmcia.save @@ -411,7 +411,7 @@ file=/etc/cron.weekly/stunnel-ekey-restart file=/etc/default/schroot file=/etc/schroot/default/nssdatabases -<% if scope.function_has_role('nagiosmaster') -%> +<% if scope.function_has_role(['nagiosmaster']) -%> file=/etc/nagios3/puppetconf.d/auto-hostgroups.cfg file=/etc/nagios3/puppetconf.d/auto-hosts.cfg file=/etc/nagios3/puppetconf.d/auto-services.cfg @@ -421,10 +421,10 @@ file=/etc/nagios3/puppetconf.d/auto-serviceextinfo.cfg file=/etc/nagios3/puppetconf.d/auto-servicegroups.cfg file=/etc/nagios3/puppetconf.d/contacts.cfg <% end -%> -<% if scope.function_has_role('muninmaster') -%> +<% if scope.function_has_role(['muninmaster']) -%> file=/etc/munin/munin.conf <% end -%> -<% if scope.function_has_role('puppetmaster') -%> +<% if scope.function_has_role(['puppetmaster']) -%> dir=8/etc/puppet <% end -%> <% if classes.include?('named::geodns') -%> @@ -451,7 +451,7 @@ file=/etc/openvpn/deb-mgmt-clients.pool <% end -%> -<% if scope.function_has_role('puppetmaster') %> +<% if scope.function_has_role(['puppetmaster']) %> # Damn you rails apps and your shoddy packaging file=/usr/share/puppet-dashboard/public/stylesheets