2 # Copyright 2014, Rackspace US, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # cmframework.requires: memcached-install.yml,galera-install.yml,rabbitmq-remove-reinitialized.yml
17 - name: Create and configure rabbitmq container
18 hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}"
20 gather_facts: "{{ osa_gather_facts | default(True) }}"
22 - include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
25 extra_container_config_no_restart:
26 - "lxc.start.order=19"
27 - include: common-tasks/unbound-clients.yml
30 - hostvars['localhost']['resolvconf_enabled'] | bool
32 - role: "system_crontab_coordination"
33 environment: "{{ deployment_environment_variables | default({}) }}"
37 # The cluster must be stopped when doing major/minor upgrades
38 # http://www.rabbitmq.com/clustering.html#upgrading
39 - name: Stop RabbitMQ nodes that are not the upgrader
40 hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}[1:]"
42 - name: "Stop RabbitMQ"
44 name: "rabbitmq-server"
46 when: rabbitmq_upgrade | default(false) | bool
48 - name: Install rabbitmq server
49 hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}"
52 - role: "rabbitmq_server"
53 - role: "rsyslog_client"
54 rsyslog_client_log_rotate_file: rabbitmq_log_rotate
55 rsyslog_client_log_dir: "/var/log/rabbitmq"
56 rsyslog_client_config_name: "99-rabbitmq-rsyslog-client.conf"
59 environment: "{{ deployment_environment_variables | default({}) }}"
63 - name: Ensure rabbitmq user for monitoring GUI
64 hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}[0]"
66 - name: Create rabbitmq user for monitoring GUI
68 user: "{{ rabbitmq_monitoring_userid|default('monitoring') }}"
69 password: "{{ rabbitmq_monitoring_password }}"
72 when: rabbitmq_monitoring_password is defined
73 environment: "{{ deployment_environment_variables | default({}) }}"