Commit fix for iterating over sso nodes
authorPeter Palfrader <peter@palfrader.org>
Tue, 1 Sep 2015 09:48:21 +0000 (09:48 +0000)
committerPeter Palfrader <peter@palfrader.org>
Tue, 1 Sep 2015 09:48:21 +0000 (09:48 +0000)
modules/roles/templates/sso_rp/ca.crl.erb

index b102218..1427d46 100644 (file)
@@ -9,12 +9,10 @@ def getcrl(host)
   return crl
 end
 
-allnodeinfo = scope.lookupvar('site::allnodeinfo')
 crl = []
 
-allnodeinfo.keys.sort.each do |node|
-  next unless scope.lookupvar('site::allnodeinfo')[node]['purpose']
-  next unless scope.lookupvar('site::allnodeinfo')[node]['purpose'].include?('sso')
+roles = scope.lookupvar('site::roles')
+roles['sso'].each do |node|
   c = getcrl(node)
   next if c.nil?
   crl << c