[chef] Re: Conditionnally loading a MySQL database


Chronological Thread 
  • From: Bryan McLellan < >
  • To:
  • Cc:
  • Subject: [chef] Re: Conditionnally loading a MySQL database
  • Date: Fri, 7 Oct 2011 11:33:55 -0400

On Fri, Oct 7, 2011 at 11:21 AM, Benoit Caron 
< >
 wrote:
> Anybody know of a cookbook that would allow to load a SQL dump from a
> recipes, but only if the databases is still empty?

This recipe creates a database if it doesn't exist:

https://github.com/opscode/cookbooks/blob/master/wordpress/recipes/default.rb#L76

Also take a look at my MySQL Ruby example in this blog post for a
larger example:

http://blog.loftninjas.org/2011/02/16/the-power-of-chef-and-ruby/

Bryan



Archive powered by MHonArc 2.6.16.

§