Skip to content

Instantly share code, notes, and snippets.

@coderanger
Created March 29, 2011 01:01
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 coderanger/891646 to your computer and use it in GitHub Desktop.
Save coderanger/891646 to your computer and use it in GitHub Desktop.
#
# This is the template file
#
<Port <%= @port %> >
# bla bla bla
</Port>
#
# The problem is I get several files; port_80.conf port_8080.conf, ... port_8888.conf
# but the contents of those files all have the last value (8888) for port.
#
#
# This is in the recipe. I am trying to make on file for each Port.
#
[ 80, 8088, 8080, 8888 ].each do |port|
template "/etc/daemon/conf/port_#{port}.conf" do
source "etc_daemon_conf_port.erb"
owner "root"
group "root"
mode "0755"
variables :port=>port
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment