Signed-off-by: Stephen Gran <steve@lobefin.net>
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)
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
}