]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
In ruby, this must be an array
authorStephen Gran <steve@lobefin.net>
Thu, 2 Jan 2014 22:16:13 +0000 (22:16 +0000)
committerStephen Gran <steve@lobefin.net>
Thu, 2 Jan 2014 22:16:13 +0000 (22:16 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/exim/templates/manualroute.erb
modules/ferm/templates/me.conf.erb
modules/samhain/templates/samhainrc.erb

index 430a4bf96e870b7b8e2123ec3d45f46f8ea42b08..899f1d999904b842de5213d5c0ec6a6a59cf8f57 100644 (file)
@@ -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" ]
index ea1b878520d7540f5116e3827b9c8c5c95bfb341..7b960e71fe3d86f0c9eae62f50a14d8c37ec4779 100644 (file)
@@ -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
index c76164cc0ce5f094e30da3f6632e5fc7c60d6cf5..b0e896562b2e15cfd554f63d5f628fe34b328e66 100644 (file)
@@ -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