X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fhas_role.rb;h=c8b537f796ea85c62d7603b6cc76653db38605e4;hb=cdf648b13dacc11edd25af11c93a67dbe7097743;hp=758f500022f0b2e57ffaea58db85dbf369123f71;hpb=23f9450261ac9199f17f6af9089cf4f63f0c0668;p=dsa-puppet.git diff --git a/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb b/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb index 758f5000..c8b537f7 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb @@ -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)