Skip to content

Instantly share code, notes, and snippets.

@damm
Forked from jtimberman/proxy.cfg.erb
Created November 16, 2009 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damm/236278 to your computer and use it in GitHub Desktop.
Save damm/236278 to your computer and use it in GitHub Desktop.
<%- @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