Updated from OpenStack Ansible Tests

Change-Id: I7741c7b5601b2d12918568f322a7829f433c63f2
This commit is contained in:
OpenStack Proposal Bot 2019-06-10 15:44:50 +00:00
parent f135d659b6
commit 27ea89b839
2 changed files with 31 additions and 2 deletions

View File

@ -36,7 +36,7 @@ WORKING_DIR="$(readlink -f $(dirname $0))"
COMMON_TESTS_PATH="${WORKING_DIR}/tests/common"
TESTING_HOME=${TESTING_HOME:-$HOME}
ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/git.openstack.org/openstack/openstack-ansible-tests"
ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/opendev.org/openstack/openstack-ansible-tests"
# Use .gitreview as the key to determine the appropriate
# branch to clone for tests.

View File

@ -33,6 +33,15 @@
name: "{{ _oslomsg_rpc_vhost }}"
state: "present"
- name: Apply RPC RabbitMQ vhost policies
rabbitmq_policy:
name: "{{ item.name }}"
pattern: "{{ item.pattern }}"
priority: "{{ item.priority | default(0) }}"
tags: "{{ item.tags }}"
vhost: "{{ _oslomsg_rpc_vhost }}"
loop: "{{ _oslomsg_rpc_policies | default([]) + oslomsg_rpc_policies }}"
- name: Add RPC RabbitMQ user
rabbitmq_user:
user: "{{ _oslomsg_rpc_userid }}"
@ -42,9 +51,18 @@
read_priv: ".*"
write_priv: ".*"
state: "present"
force: true
force: false
no_log: true
- name: Verify password changed
command: "rabbitmqctl authenticate_user {{ _oslomsg_rpc_userid }} {{ _oslomsg_rpc_password }}"
register: rpc_password_changed
- name: Set password when changed
command: "rabbitmqctl change_password {{ _oslomsg_rpc_userid }} {{ _oslomsg_rpc_password }}"
when:
- rpc_password_changed.rc != 0
- name: Setup Notify MQ Service (RabbitMQ)
delegate_to: "{{ _oslomsg_notify_setup_host }}"
when:
@ -58,6 +76,17 @@
name: "{{ _oslomsg_notify_vhost }}"
state: "present"
- name: Apply Notify RabbitMQ vhost policies
rabbitmq_policy:
name: "{{ item.name }}"
pattern: "{{ item.pattern }}"
priority: "{{ item.priority | default(0) }}"
tags: "{{ item.tags }}"
vhost: "{{ _oslomsg_notify_vhost }}"
loop: "{{ _oslomsg_notify_policies | default([]) + oslomsg_notify_policies }}"
when:
- _oslomsg_notify_vhost != _oslomsg_rpc_vhost
- name: Add Notify RabbitMQ user
rabbitmq_user:
user: "{{ _oslomsg_notify_userid }}"