Created
June 18, 2009 19:56
-
-
Save mdkent/132156 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
### definition | |
# | |
# Cookbook Name:: example | |
# Definition:: example_config_geocoders | |
# | |
define :example_config_geocoders, :geocoders_list => nil, :app_config_dir => nil do | |
app_config_dir = params[:app_config_dir] | |
geocoders_list = params[:geocoders_list] | |
list = {"yahoo" => "API_KEY"} | |
template app_config_dir + "/geocoders.yml" do | |
source "geocoders.yml.erb" | |
owner node[:example][:user] | |
group node[:example][:group] | |
mode "0644" | |
variables( | |
:geocoders_list => list | |
) | |
end | |
end | |
### geocoders.yml.erb | |
<% @geocoders_list.each_pair do |name, value| %> | |
<%= name %>: <%= value %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment