In order to prevent race conditions with nodes joining the cluster simultaneously when the cluster is first formed, we move the rabbitmq installation play to be 'serial: 1'. However, when the nodes are being upgraded, it cannot be done in serial so in this case we set 'serial: 0' The tests are removed from a post_task include in the install play, and moved to their own play as they need to be run after the entire cluster has been formed. As well as moving a few generic vars into the test-vars.yml include, we also pass in the specific version of rabbitmq to be tested against in the test play. Fixes-Bug: #1573030 Change-Id: Id119ff9f20ddfd8e1f29598c8c5ce862d2e7fab4
27 lines
966 B
YAML
27 lines
966 B
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.
|
|
|
|
# NOTE(mancdaz): rabbitmq cannot be upgraded in serial, so when
|
|
# rabbitmq_upgrade=True, serial is set to 0, else it is 1 for installs
|
|
- name: Install RabbitMQ server
|
|
hosts: rabbitmq_all
|
|
serial: "{{ rabbitmq_upgrade|default(false) | bool | ternary(0, 1)}}"
|
|
user: root
|
|
gather_facts: true
|
|
roles:
|
|
- role: "{{ rolename | basename }}"
|
|
vars_files:
|
|
- test-vars.yml
|