Created
January 9, 2013 21:04
-
-
Save anonymous/4496942 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# | |
# PRODUCTION | |
# | |
production: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: gitlabhq_production | |
pool: 5 | |
username: <%= ENV['PROD_DB_USER'] %> | |
password: <%= ENV['PROD_DB_PASSWORD'] %> | |
# host: localhost | |
# socket: /tmp/mysql.sock |
Answer is to use cookbook_file:
http://wiki.opscode.com/display/chef/Resources#Resources-CookbookFile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is being put on our server with Chef - like this:
template "/home/gitlab/shared/config/database.yml" do
source "database.yml.erb"
owner "gitlab"
group "gitlab"
mode 0644
end
Currently, it just writes whatever the current ENV variables are in the final database.yml - is there a way to tell Chef to NOT evaluate those Ruby statements during the install? I want it to say:
<%= ENV['PROD_DB_USER'] %> and <%= ENV['PROD_DB_PASSWORD'] %> in the final template.