Sha256: 30ad2aff257ac29425b35346db727a6abd6c4be372924fde1115ff779bf058b7
Contents?: true
Size: 930 Bytes
Versions: 7
Compression:
Stored size: 930 Bytes
Contents
require 'daddy/itamae' case os_version when /rhel-6\.(.*?)/ package 'mysql' do user 'root' end package 'mysql-server' do user 'root' end template '/etc/my.cnf' do user 'root' owner 'root' group 'root' mode '644' end service 'mysqld' do user 'root' action [:enable, :start] end when /rhel-7\.(.*?)/ package 'mariadb' do user 'root' end package 'mariadb-server' do user 'root' end template '/etc/my.cnf.d/daddy.cnf' do user 'root' owner 'root' group 'root' mode '644' end service 'mariadb' do user 'root' action [:enable, :start] end else raise I18n.t('itamae.errors.unsupported_os_version', :os_version => os_version) end execute 'mysql_secure_installation' do user 'root' command "bash #{File.join(File.dirname(__FILE__), 'mysql_secure_installation.sh')}" only_if "mysql -u root -e 'select 1;' && test $? -eq 0" end
Version data entries
7 entries across 7 versions & 1 rubygems