Sha256: ceb33ef8fa8855f0e95b8a89f762158395ee5b51123d3c4a869dc918364c280e

Contents?: true

Size: 737 Bytes

Versions: 2

Compression:

Stored size: 737 Bytes

Contents

namespace :mysql do
  
  namespace :centos do
    
    desc <<-DESC
    Install mysql.
    
    "Source":#{link_to_source(__FILE__)}
    DESC
    task_arg(:mysql_admin_password_set, "Mysql admin password (to set)", :default => Proc.new{prompt.password('Mysql admin password (to set): ', :verify => true)}, :default_desc => "password prompt")
    task :install do    
      # Install through package manager
      yum.install([ "mysql", "mysql-devel", "mysql-server" ])

      # Install service
      run_via "/sbin/chkconfig --level 345 mysqld on"
      run_via "/sbin/service mysqld restart"
      
      # Set admin password
      run_via "/usr/bin/mysqladmin -u root password #{mysql_admin_password_set}"    
    end
    
  end
  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
calas-capitate-0.3.6 lib/recipes/centos/mysql.rb
capitate-0.3.6 lib/recipes/centos/mysql.rb