]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
try this on
authorStephen Gran <steve@lobefin.net>
Thu, 2 Jan 2014 21:58:52 +0000 (21:58 +0000)
committerStephen Gran <steve@lobefin.net>
Thu, 2 Jan 2014 21:58:52 +0000 (21:58 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/puppetmaster/lib/puppet/parser/functions/has_role.rb
modules/roles/manifests/init.pp

index 758f500022f0b2e57ffaea58db85dbf369123f71..c8b537f796ea85c62d7603b6cc76653db38605e4 100644 (file)
@@ -1,5 +1,6 @@
 module Puppet::Parser::Functions
-  newfunction(:has_role, :type => :rvalue) do |role|
+  newfunction(:has_role, :type => :rvalue) do |args|
+      role = args[0]
       roles = lookupvar('site::roles')
       fqdn = lookupvar('fqdn')
       if not roles.include?(role)
index 81b668fde39d59ed624f78c5b5c72cebf0396fa8..e603cff60d7693f5eee232099133809550d2124b 100644 (file)
@@ -39,9 +39,8 @@ class roles {
                include roles::security_mirror
        }
 
-
-        # XXX: turn this into a real role
-        if getfromhash($site::nodeinfo, 'apache2_www_mirror') {
+       # XXX: turn this into a real role
+       if getfromhash($site::nodeinfo, 'apache2_www_mirror') {
                include roles::www_mirror
        }