Updated from OpenStack Ansible Tests
Change-Id: I8e613cd82793d86e9da0c9a1e50375dcb1cc3834
This commit is contained in:
parent
2ac051b8a0
commit
c1f87a9dc1
@ -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.
|
||||
|
@ -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 }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user