--- # 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"