Skip to content

Commit

Permalink
Merge pull request rabbitmq#14 from tacitknowledge/COOK-1501
Browse files Browse the repository at this point in the history
COOK-1501 Allow installation from yum
  • Loading branch information
Joshua Timberman committed Aug 6, 2012
2 parents 5cad065 + 7c66c06 commit ab7cedf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

# RabbitMQ version to install for "redhat", "centos", "scientific", and "amazon".
default['rabbitmq']['version'] = '2.8.4'
# Override this if you have a yum repo with rabbitmq available.
default['rabbitmq']['use_yum'] = false

# config file location
# http://www.rabbitmq.com/configure.html#define-environment-variables
Expand Down
21 changes: 14 additions & 7 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,20 @@

when "redhat", "centos", "scientific", "amazon", "fedora"

remote_file "#{Chef::Config[:file_cache_path]}/rabbitmq-server-#{node['rabbitmq']['version']}-1.noarch.rpm" do
source "https://www.rabbitmq.com/releases/rabbitmq-server/v#{node['rabbitmq']['version']}/rabbitmq-server-#{node['rabbitmq']['version']}-1.noarch.rpm"
action :create_if_missing
end

rpm_package "#{Chef::Config[:file_cache_path]}/rabbitmq-server-#{node['rabbitmq']['version']}-1.noarch.rpm" do
action :install
if node['rabbitmq']['use_yum'] then
package "rabbitmq-server" do
version "#{node['rabbitmq']['version']}-1"
action :install
end
else
remote_file "#{Chef::Config[:file_cache_path]}/rabbitmq-server-#{node['rabbitmq']['version']}-1.noarch.rpm" do
source "https://www.rabbitmq.com/releases/rabbitmq-server/v#{node['rabbitmq']['version']}/rabbitmq-server-#{node['rabbitmq']['version']}-1.noarch.rpm"
action :create_if_missing
end

rpm_package "#{Chef::Config[:file_cache_path]}/rabbitmq-server-#{node['rabbitmq']['version']}-1.noarch.rpm" do
action :install
end
end

end
Expand Down

0 comments on commit ab7cedf

Please sign in to comment.