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 758f500..c8b537f 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 81b668f..e603cff 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
        }