summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-02-12 19:01:23 +0000
committerGerrit Code Review <review@openstack.org>2017-02-12 19:01:23 +0000
commitca9fffc54913e3cbf4e74ee5a8fca8213a550caf (patch)
treec981822d6c0b0a17177815da8bae81f2e72b8a61 /manifests
parentceb3c50bfd253b3b95dd22ee90b2a373e44eeb03 (diff)
parent76931e535c69ab437c4710dc749bc363f4533ea5 (diff)
Merge "Add support to changing the Rabbitmq password on update"
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/base/rabbitmq.pp26
1 files changed, 26 insertions, 0 deletions
diff --git a/manifests/profile/base/rabbitmq.pp b/manifests/profile/base/rabbitmq.pp
index fd8de8f..1eaabf0 100644
--- a/manifests/profile/base/rabbitmq.pp
+++ b/manifests/profile/base/rabbitmq.pp
@@ -43,6 +43,18 @@
# (Optional) Array of host(s) for RabbitMQ nodes.
# Defaults to hiera('rabbitmq_node_names', []).
#
+# [*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.
@@ -55,6 +67,9 @@ class tripleo::profile::base::rabbitmq (
$kernel_variables = hiera('rabbitmq_kernel_variables'),
$inet_dist_interface = hiera('rabbitmq::interface', undef),
$nodes = hiera('rabbitmq_node_names', []),
+ $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.
@@ -103,6 +118,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,
+ }
+ }
}
}