You can access object variables (the ones that start with @) in templates, only if you passed them through variables
method of template like that:
template("/etc/nginx/nginx.conf") do
[...]
variables( :my_var => node )
[...]
end
Then you will have @my_var
available in template. But you don't have to pass the node
, because it is already available in templates. You just have to access it not as an object variable. The following code in template should work.
<%= node[:nginx][:worker_processes] %>
Just remove the @
from the front of node
.