Skip to content

Instantly share code, notes, and snippets.

@JangoSteve
Forked from bruno-/gist:2294117
Created April 3, 2012 19:13
Show Gist options
  • Save JangoSteve/2294823 to your computer and use it in GitHub Desktop.
Save JangoSteve/2294823 to your computer and use it in GitHub Desktop.

Revisions

  1. bsutic created this gist Apr 3, 2012.
    10 changes: 10 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    desc "Install the latest stable release of MySql."
    task :install, roles: :db, only: {primary: true} do
    #run "echo #{mysql_password}"
    run "#{sudo} apt-get -y update"
    run "#{sudo} apt-get -y install mysql-server" do |channel, stream, data|
    # prompts for mysql root password (when blue screen appears)
    channel.send_data("#{mysql_root_password}\n\r") if data =~ /password/
    end
    run "#{sudo} apt-get -y install mysql-client libmysqlclient-dev"
    end