]> git.openstreetmap.org Git - chef.git/commitdiff
donate: fix db secret handling
authorGrant Slater <git@firefishy.com>
Thu, 22 Sep 2016 00:29:12 +0000 (01:29 +0100)
committerGrant Slater <git@firefishy.com>
Thu, 22 Sep 2016 00:29:23 +0000 (01:29 +0100)
cookbooks/donate/recipes/default.rb
cookbooks/donate/templates/default/db-connect.inc.php.erb

index bf1d46419f236d13f0b9a1136036eb65c2b14950..3fbeb19d5b92f87a2356cc1e98bbb1e076c2cc8e 100644 (file)
@@ -90,7 +90,7 @@ template "/etc/cron.d/osmf-donate" do
   owner "root"
   group "root"
   mode 0o600
-  variables :database_password => database_password
+  variables :passwords => passwords
 end
 
 template "/etc/cron.daily/osmf-donate-backup" do
@@ -98,5 +98,5 @@ template "/etc/cron.daily/osmf-donate-backup" do
   owner "root"
   group "root"
   mode 0o750
-  variables :database_password => database_password
+  variables :passwords => passwords
 end
index b2d2a6f5e4b82650463f46edf755575122784660..ce05bc99f57954b18e99a8aad0e3c1b09514941b 100644 (file)
@@ -1,4 +1,4 @@
 <?php
-$_DB_H = mysql_connect('localhost','donate','<%= @database_password %>');
+$_DB_H = mysql_connect('localhost','donate','<%= @passwords['database'] %>');
 mysql_select_db('donate', $_DB_H);
 mysql_query('SET NAMES \'utf8\'', $_DB_H);