Created
March 29, 2011 01:01
-
-
Save coderanger/891646 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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