75b36283fa
The rabbitmq-install play now supports a variable inventory host group defined with *rabbitmq_host_group*. This allows deployers to use the play to create multiple RabbitMQ clusters using for example: Typical infra cluster: openstack-ansible rabbitmq-install.yml Second cluster for telemetry: openstack-ansible -e "rabbitmq_host_group=telemetry_rabbitmq_all" rabbitmq-install.yml Many vars were moved from group-specific group_vars to the "all" group as the ceilometer role/play requires the RabbitMQ details and telemetry enabled state for all services that can potentially be monitored by ceilometer. By default, the "telemetry cluster" and the "RPC" cluster are the same, but deployers that wish to create multiple clusters are able to override the *_rabbitmq_telemetry_* vars when choosing to run separate clusters. Use case is more fully explained here: http://trumant.github.io/openstack-ansible-multiple-rabbitmq-clusters.html Change-Id: I737711085fc0e50c4c5a0ee7c2037927574f8448 Depends-On: Ib23c8829468bbb4ddae67e08a092240f54a6c729 Depends-On: Ifad921525897c5887f6ad6871c6d72c595d79fa6 Depends-On: I7cc5a5dac4299bd3d1bc810ea886f3888abaa2da Depends-On: Ib3ee5b409dbc2fc2dc8d25990d4962ec49e21131 Depends-On: I397b56423d9ef6757bada27c92b7c9f0d5126cc9 Depends-On: I98cb273cbd8948072ef6e7fc5a15834093d70099 Depends-On: I89363b64ff3f41ee65d72ec51cb8062fc7bf08b0 Implements: blueprint multi-rabbitmq-clusters
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
---
|
|
# Copyright 2016, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# Usage:
|
|
# To use this common task to create rabbitmq virtual hosts if needed
|
|
# and to create a user within rabbitmq. To use this common task the
|
|
# variables "vhost", "user", and "password" must be set.
|
|
|
|
- name: Ensure Rabbitmq vhost
|
|
rabbitmq_vhost:
|
|
name: "{{ vhost }}"
|
|
state: "present"
|
|
delegate_to: "{{ groups[_rabbitmq_host_group][0] }}"
|
|
|
|
- name: Ensure rabbitmq user
|
|
rabbitmq_user:
|
|
user: "{{ user }}"
|
|
password: "{{ password }}"
|
|
vhost: "{{ vhost }}"
|
|
configure_priv: ".*"
|
|
read_priv: ".*"
|
|
write_priv: ".*"
|
|
state: "present"
|
|
delegate_to: "{{ groups[_rabbitmq_host_group][0] }}"
|