From 373044350a9e4239c0fcd36eb5efcf8cc02754ae Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Thu, 2 Jan 2014 21:58:52 +0000 Subject: [PATCH] try this on Signed-off-by: Stephen Gran --- modules/puppetmaster/lib/puppet/parser/functions/has_role.rb | 3 ++- modules/roles/manifests/init.pp | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 } -- 2.20.1