Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<%- @app_servers.each do |app| %>
server <%= app['hostname'] %> <%= app['ipaddress'] %>:80
<%- end %>
app_servers = search(:node, 'role:webserver')
template "/etc/proxy.cfg" do
source "proxy.cfg.erb"
variables :app_servers => app_servers[0]
notifies :restart, resources(:service => "proxy")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment