Set correct ordering for the rabbitmq_plugin resource

This change also set the correct way to install rabbitmq plugins on
the fuel master node.

Closes-Bug: #1620304
Change-Id: I31501a67e97821ce0e3c0875bfefe20c168ba9e7
Signed-off-by: Maksim Malchuk <mmalchuk@mirantis.com>
This commit is contained in:
Maksim Malchuk 2016-09-04 20:03:11 +03:00
parent 4c45a07c09
commit 3df13c57ce
2 changed files with 12 additions and 10 deletions

View File

@ -17,7 +17,8 @@ class fuel::rabbitmq (
$stomp = false,
) inherits fuel::params {
include stdlib
include ::stdlib
anchor { 'rabbitmq-begin' :}
anchor { 'rabbitmq-end' :}
@ -72,13 +73,13 @@ class fuel::rabbitmq (
require => [Class['::rabbitmq'], Rabbitmq_vhost['/']]
}
file { '/etc/rabbitmq/enabled_plugins':
content => '[amqp_client,rabbitmq_stomp,rabbitmq_management].',
owner => root,
group => root,
mode => '0644',
require => Package['rabbitmq-server'],
notify => Service['rabbitmq-server'],
# enable plugins 'amqp_client' and 'rabbitmq_stomp'.
# plugin 'rabbitmq_management' would be enabled by the ::rabbitmq class
rabbitmq_plugin {['amqp_client','rabbitmq_stomp']:
ensure => present,
require => Package['rabbitmq-server'],
notify => Service['rabbitmq-server'],
provider => 'rabbitmqplugins',
}
if $stomp {
@ -180,8 +181,9 @@ class fuel::rabbitmq (
tries => 30,
try_sleep => 6,
}
# Make sure the various providers have their requirements in place.
Class['::rabbitmq::install'] -> Rabbitmq_plugin<| |> -> Rabbitmq_exchange<| |>
Class['::rabbitmq::install'] -> File['/etc/rabbitmq'] -> Rabbitmq_plugin<| |> -> Rabbitmq_exchange<| |>
Anchor['rabbitmq-begin'] ->
Class['::rabbitmq'] ->

View File

@ -171,7 +171,7 @@ class osnailyfacter::rabbitmq::rabbitmq {
}
# Make sure the various providers have their requirements in place.
Class['::rabbitmq::install'] -> Rabbitmq_plugin<| |> -> Rabbitmq_exchange<| |>
Class['::rabbitmq::install'] -> File['/etc/rabbitmq'] -> Rabbitmq_plugin<| |> -> Rabbitmq_exchange<| |>
rabbitmq_user { $rabbit_hash['user']:
admin => true,