From: Stephen Gran Date: Thu, 2 Jan 2014 21:58:52 +0000 (+0000) Subject: try this on X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=373044350a9e4239c0fcd36eb5efcf8cc02754ae;p=mirror%2Fdsa-puppet.git try this on 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 758f50002..c8b537f79 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) diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index 81b668fde..e603cff60 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -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 }