openstack-ansible-tests/ensure-oslomsg.yml
Andrew Smith 7c756b1f91 Update to use oslo.messaging services for RPC and Notify
This commit contains updates to introduced oslo.messaging
service in place of rabbitmq server.

This patch:
* Add ensure oslo.messaging vhost and user for backend
* Update service role installs
* Add oslo.messaging settings to test-vars

Change-Id: Ie69d522ee2df4282ce4fc69c2b3f81f4df1da77d
2018-04-30 16:35:22 -04:00

77 lines
2.1 KiB
YAML

---
# Copyright 2015, 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.
- name: Ensure RPC Rabbitmq vhost
rabbitmq_vhost:
name: "{{ rpc_vhost }}"
state: "present"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
when:
- oslomsg_rpc_transport == "rabbit"
- name: Ensure RPC Rabbitmq user
rabbitmq_user:
user: "{{ rpc_user }}"
password: "{{ rpc_password }}"
vhost: "{{ rpc_vhost }}"
configure_priv: ".*"
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
no_log: true
when:
- oslomsg_rpc_transport == "rabbit"
- name: Ensure Notify Rabbitmq vhost
rabbitmq_vhost:
name: "{{ notify_vhost }}"
state: "present"
delegate_to: "{{ groups['oslomsg_notify_all'][0] }}"
run_once: True
when:
- oslomsg_notify_transport == "rabbit"
- name: Ensure Notify Rabbitmq user
rabbitmq_user:
user: "{{ notify_user }}"
password: "{{ notify_password }}"
vhost: "{{ notify_vhost }}"
configure_priv: ".*"
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "{{ groups['oslomsg_notify_all'][0] }}"
run_once: True
no_log: true
when:
- oslomsg_notify_transport == "rabbit"
- name: Ensure RPC qdrouterd vhost
command: echo "create qdrouterd vhost"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
when:
- oslomsg_rpc_transport == "amqp"
- name: Ensure RPC qdrouterd user
command: echo "create qdrouterd user"
delegate_to: "{{ groups['oslomsg_rpc_all'][0] }}"
run_once: True
when:
- oslomsg_rpc_transport == "amqp"