Permalink
Browse files

[COOK-526] generate mysql password attributes in recipe

  • Loading branch information...
1 parent 3298236 commit efb27ba56330065bf974b33aca56d9df69949772 @schisamo schisamo committed May 4, 2011
Showing with 7 additions and 6 deletions.
  1. +0 −6 mysql/attributes/server.rb
  2. +7 −0 mysql/recipes/server.rb
View
6 mysql/attributes/server.rb
@@ -17,12 +17,6 @@
# limitations under the License.
#
-::Chef::Node.send(:include, Opscode::OpenSSL::Password)
-
-set_unless['mysql']['server_debian_password'] = secure_password
-set_unless['mysql']['server_root_password'] = secure_password
-set_unless['mysql']['server_repl_password'] = secure_password
-
default['mysql']['bind_address'] = ipaddress
default['mysql']['datadir'] = "/var/lib/mysql"
View
7 mysql/recipes/server.rb
@@ -17,8 +17,15 @@
# limitations under the License.
#
+::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
+
include_recipe "mysql::client"
+# generate all passwords
+node.set_unless['mysql']['server_debian_password'] = secure_password
+node.set_unless['mysql']['server_root_password'] = secure_password
+node.set_unless['mysql']['server_repl_password'] = secure_password
+
if platform?(%w{debian ubuntu})
directory "/var/cache/local/preseeding" do

0 comments on commit efb27ba

Please sign in to comment.