From: Stephen Gran Date: Thu, 2 Jan 2014 19:55:19 +0000 (+0000) Subject: we are passed a string X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;ds=inline;h=23f9450261ac9199f17f6af9089cf4f63f0c0668;hp=9aaba8cd1fae6f75fab74c6e9f0b30f7ede54b92;p=mirror%2Fdsa-puppet.git we are passed a string Signed-off-by: Stephen Gran --- diff --git a/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb b/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb index ecb3cabc6..758f50002 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb @@ -1,6 +1,5 @@ module Puppet::Parser::Functions - newfunction(:has_role, :type => :rvalue) do |args| - role = args.shift + newfunction(:has_role, :type => :rvalue) do |role| roles = lookupvar('site::roles') fqdn = lookupvar('fqdn') if not roles.include?(role)