diff options
author | Giulio Fidente <gfidente@redhat.com> | 2015-02-13 06:36:05 -0500 |
---|---|---|
committer | Giulio Fidente <gfidente@redhat.com> | 2015-02-13 11:24:44 -0500 |
commit | 112a42f34d4384eab729f039ad60b88cc714d09b (patch) | |
tree | 35e9de63428f37373ee577429d72c08cbdf0618d /puppet/manifests | |
parent | b639d3c7c28b6913da997b823452f33b9bd721c8 (diff) |
Puppet/RabbitMQ: support clustering
Allow to install & configure RabbitMQ in cluster with Puppet on
the controller node.
Change-Id: Iebbf55c75b8c80453c7313bb41faf42c7fdf7159
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index b37f7235..2e83b8c3 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -110,11 +110,18 @@ if hiera('step') >= 1 { Class['rabbitmq'] -> Rabbitmq_user <| |> Class['rabbitmq'] -> Rabbitmq_user_permissions <| |> - # TODO Rabbit HA + $rabbit_nodes = split(downcase(hiera('rabbit_nodes', $::hostname)), ',') + if count($rabbit_nodes) > 1 { + $rabbit_cluster = true + } + else { + $rabbit_cluster = false + } class { 'rabbitmq': - package_provider => $rabbit_provider, - config_cluster => false, - node_ip_address => hiera('controller_host'), + package_provider => $rabbit_provider, + config_cluster => $rabbit_cluster, + cluster_nodes => $rabbit_nodes, + node_ip_address => hiera('controller_host'), } rabbitmq_vhost { '/': |