Merge "Add support to changing the Rabbitmq password on update" into stable/newton
This commit is contained in:
commit
3735d0c109
|
@ -38,6 +38,18 @@
|
|||
# (Optional) Array of host(s) for RabbitMQ nodes.
|
||||
# Defaults to hiera('rabbitmq_node_ips', []).
|
||||
#
|
||||
# [*rabbitmq_pass*]
|
||||
# (Optional) RabbitMQ Default Password.
|
||||
# Defaults to hiera('rabbitmq::default_pass')
|
||||
#
|
||||
# [*rabbitmq_user*]
|
||||
# (Optional) RabbitMQ Default User.
|
||||
# Defaults to hiera('rabbitmq::default_user')
|
||||
#
|
||||
# [*stack_action*]
|
||||
# (Optional) Action of the stack deployment.
|
||||
# Defaults to hiera('stack_action')
|
||||
#
|
||||
# [*step*]
|
||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
||||
# for more details.
|
||||
|
@ -49,6 +61,9 @@ class tripleo::profile::base::rabbitmq (
|
|||
$ipv6 = str2bool(hiera('rabbit_ipv6', false)),
|
||||
$kernel_variables = hiera('rabbitmq_kernel_variables'),
|
||||
$nodes = hiera('rabbitmq_node_ips', []),
|
||||
$rabbitmq_pass = hiera('rabbitmq::default_pass'),
|
||||
$rabbitmq_user = hiera('rabbitmq::default_user'),
|
||||
$stack_action = hiera('stack_action'),
|
||||
$step = hiera('step'),
|
||||
) {
|
||||
# IPv6 environment, necessary for RabbitMQ.
|
||||
|
@ -91,6 +106,17 @@ class tripleo::profile::base::rabbitmq (
|
|||
environment_variables => $rabbit_env,
|
||||
}
|
||||
}
|
||||
# In case of HA, starting of rabbitmq-server is managed by pacemaker, because of which, a dependency
|
||||
# to Service['rabbitmq-server'] will not work. Sticking with UPDATE action.
|
||||
if $stack_action == 'UPDATE' {
|
||||
# Required for changing password on update scenario. Password will be changed only when
|
||||
# called explicity, if the rabbitmq service is already running.
|
||||
rabbitmq_user { $rabbitmq_user :
|
||||
password => $rabbitmq_pass,
|
||||
provider => 'rabbitmqctl',
|
||||
admin => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
issues:
|
||||
- Invoke rabbitmq_user resource explicity to apply password change during
|
||||
update, if any.
|
Loading…
Reference in New Issue