Class: DanarchyDeploy::Services::MySQL::NewServer

Inherits:
Object
  • Object
show all
Defined in:
lib/danarchy_deploy/services/mysql/new_server.rb

Class Method Summary collapse

Class Method Details

.new(os, mysql, options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/danarchy_deploy/services/mysql/new_server.rb', line 6

def self.new(os, mysql, options)
  self.generate_root_mycnf(mysql, options)

  if os == 'gentoo'
    self.gentoo_new_mysql(mysql, options)
  elsif os == 'opensuse'
    self.opensuse_new_mysql(mysql, options)
  elsif %w[debian ubuntu].include?(os)
    self.debian_new_mysql(mysql, options)
  elsif %w[centos redhat].include?(os)
    self.centos_new_mysql(mysql, options)
  end
end