I am very new to ruby and chef. I am trying to create entries in an nginx.conf file based on the number of cores.
for i in <%= node["cpu"]["total"]%>
upstream frontends {
server 127.0.0.1:805x;
}
end
So..if 4 cores the file will look like this:
upstream frontends {
server 127.0.0.1:8051;
server 127.0.0.1:8052;
server 127.0.0.1:8053;
server 127.0.0.1:8054;
}
Best Answer
Recipe
Template