diff --git a/recipes/_redhat_galera.rb b/recipes/_redhat_galera.rb index 39593504..8d725db0 100644 --- a/recipes/_redhat_galera.rb +++ b/recipes/_redhat_galera.rb @@ -17,12 +17,11 @@ # limitations under the License. # -#To force removing of mariadb-libs on CentOS >= 7 +# To force removing of mariadb-libs on CentOS >= 7 package 'MariaDB-shared' do - action:install + action :install end - package 'MariaDB-Galera-server' do action :install notifies :create, 'directory[/var/log/mysql]', :immediately diff --git a/recipes/_redhat_server.rb b/recipes/_redhat_server.rb index 0ff371fa..c279a2b1 100644 --- a/recipes/_redhat_server.rb +++ b/recipes/_redhat_server.rb @@ -17,9 +17,9 @@ # limitations under the License. # -#To force removing of mariadb-libs on CentOS >= 7 +# To force removing of mariadb-libs on CentOS >= 7 package 'MariaDB-shared' do - action:install + action :install end package 'MariaDB-server' do diff --git a/recipes/repository.rb b/recipes/repository.rb index 637b3616..4720cbfd 100644 --- a/recipes/repository.rb +++ b/recipes/repository.rb @@ -21,10 +21,15 @@ when 'yum' include_recipe 'yum::default' + if node['platform'] == 'redhat' + target_platform = "rhel#{node['platform_version'].to_i}" + else + target_platform = "#{node['platform']}#{node['platform_version'].to_i}" + end yum_repository "mariadb-#{node['mariadb']['install']['version']}" do description 'MariaDB Official Repository' baseurl 'http://yum.mariadb.org/' + \ - node['mariadb']['install']['version'] + "/#{node['platform']}#{node['platform_version'].to_i}-amd64" + node['mariadb']['install']['version'] + "/#{target_platform}-amd64" gpgkey 'https://yum.mariadb.org/RPM-GPG-KEY-MariaDB' action :create end