Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HFC updates #56

Merged
merged 2 commits into from
Nov 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
default["rabbitmq"]["platform"] = { # node_attribute
"rabbitmq_service" => "rabbitmq-server",
"rabbitmq_service_regex" => "/etc/rabbitmq/rabbitmq",
"pgrep_bin" => "/usr/bin/pgrep",
"service_bin" => "/sbin/service",
"package_options" => ""
}
when "ubuntu"
default["rabbitmq"]["platform"] = { # node_attribute
"rabbitmq_service" => "rabbitmq-server",
"rabbitmq_service_regex" => "/etc/rabbitmq/rabbitmq",
"pgrep_bin" => "/usr/bin/pgrep",
"service_bin" => "/usr/sbin/service",
"package_options" => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'"
}
Expand Down
10 changes: 1 addition & 9 deletions recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@
# TODO(shep): Should probably use Opscode::OpenSSL::Password for default_password
#

# default to using distro-provided packages for RHEL based systems since 3.x
# is in EPEL. Otherwise we need to get it from rabbitmq.com
if platform_family?("rhel","fedora")
node.override["rabbitmq"]["use_distro_version"] = true
else
node.override["rabbitmq"]["use_distro_version"] = false
end

# need to build out [rabbitmq][cluster_disk_nodes] from a search of the nodes
# that include the rabbitmq-server role
node.set["rabbitmq"]["cluster_disk_nodes"] = osops_search(search_string="rabbitmq-server",one_or_all=:all,include_me=true,order=[:role]).map(&:hostname).map! { |k| "rabbit@#{k}" }
Expand Down Expand Up @@ -100,7 +92,7 @@
end

keepalived_chkscript "rabbitmq" do
script "#{platform_options["service_bin"]} rabbitmq-server status"
script "#{platform_options["pgrep_bin"]} rabbitmq-server"
interval 5
action :create
end
Expand Down