Skip to content

Commit

Permalink
Merge pull request #55 from yinym/redhat-repository
Browse files Browse the repository at this point in the history
Mapping platform 'redhat' to 'rhel' for redhat platform
  • Loading branch information
sinfomicien committed Feb 22, 2015
2 parents 1a93b6c + 4240467 commit 3eb5f88
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 2 additions & 3 deletions recipes/_redhat_galera.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions recipes/_redhat_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion recipes/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3eb5f88

Please sign in to comment.