-allnodeinfo.keys.sort.each do |host|
- next unless allnodeinfo[host]['mXRecord']
- allnodeinfo[host]['mXRecord'].each do |mx|
+scope.lookupvar('site::allnodeinfo').keys.sort.each do |host|
+ next unless scope.lookupvar('site::allnodeinfo')[host]['mXRecord']
+ scope.lookupvar('site::allnodeinfo')[host]['mXRecord'].each do |mx|