Permalink
Browse files

move hardcoded localhost value to db host attribute

  • Loading branch information...
1 parent 3ce0924 commit 8ec67a8ac595fe5b3cf180a035da68356529e7a4 @mdxp mdxp committed Nov 3, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −0 attributes/default.rb
  2. +2 −1 recipes/default.rb
  3. +1 −1 templates/default/grants.sql.erb
@@ -23,6 +23,7 @@
default['drupal']['dir'] = "/var/www/drupal"
default['drupal']['db']['database'] = "drupal"
default['drupal']['db']['user'] = "drupal"
+default['drupal']['db']['host'] = "localhost"
default['drupal']['site']['admin'] = "admin"
default['drupal']['site']['pass'] = "drupaladmin"
default['drupal']['site']['name'] = "Drupal7"
View
@@ -37,7 +37,8 @@
variables(
:user => node['drupal']['db']['user'],
:password => node['drupal']['db']['password'],
- :database => node['drupal']['db']['database']
+ :database => node['drupal']['db']['database'],
+ :host => node['drupal']['db']['host']
)
notifies :run, resources(:execute => "mysql-install-drupal-privileges"), :immediately
end
@@ -1,4 +1,4 @@
GRANT ALL ON <%= @database %>.* TO '<%= @user %>'@'%' IDENTIFIED BY '<%= @password %>';
-GRANT ALL ON <%= @database %>.* TO '<%= @user %>'@'localhost' IDENTIFIED BY '<%= @password %>';
+GRANT ALL ON <%= @database %>.* TO '<%= @user %>'@'<%= @host %>' IDENTIFIED BY '<%= @password %>';
FLUSH PRIVILEGES;

0 comments on commit 8ec67a8

Please sign in to comment.