Passing variables to template partials

Hi,
I need few pointers. I am trying to pass variables inside an each loop to a template partial. I am getting this error

FATAL: Chef::Mixin::Template::TemplateError: undefined local variable or method

This is the code.

<% @hosts.each do |key, value| %>
<%= render "protocol.erb", :variables => {:protocol => value['protocol'] } %>
<% end %>