Add service policies defenition

In order to allow definition of policies per service, we need to add variables
so service roles, that will be passed to openstack.osa.mq_setup.

Currently this can be handled by leveraging group_vars and overriding `oslomsg_rpc_policies` as a whole, but it's not obvious and
can be non-trivial for some groups which are co-locating multiple services
or in case of metal deployments.

Change-Id: I9faab7b89cc870a3580c622d3a9bab79c7500e8e
This commit is contained in:
Dmitriy Rabotyagov 2024-04-26 18:55:51 +02:00
parent 0b4ddeecea
commit 29bf7db198
2 changed files with 8 additions and 0 deletions

View File

@ -133,6 +133,7 @@ trove_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}"
trove_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}"
trove_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}"
trove_oslomsg_rpc_userid: trove
trove_oslomsg_rpc_policies: []
# vhost name depends on value of oslomsg_rabbit_quorum_queues. In case quorum queues
# are not used - vhost name will be prefixed with leading `/`.
trove_oslomsg_rpc_vhost:
@ -155,6 +156,7 @@ trove_oslomsg_notify_password: "{{ trove_oslomsg_rpc_password }}"
trove_oslomsg_notify_vhost: "{{ trove_oslomsg_rpc_vhost }}"
trove_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}"
trove_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}"
trove_oslomsg_notify_policies: []
## RabbitMQ integration
trove_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}"
@ -204,6 +206,7 @@ trove_guest_oslomsg_rpc_userid: "{{ trove_oslomsg_rpc_userid }}"
trove_guest_oslomsg_rpc_password: "{{ trove_oslomsg_rpc_password }}"
trove_guest_oslomsg_rpc_ssl_version: "{{ trove_oslomsg_rpc_ssl_version }}"
trove_guest_oslomsg_rpc_ssl_ca_file: "{{ trove_oslomsg_rpc_ssl_ca_file }}"
trove_guest_oslomsg_rpc_policies: []
trove_guest_oslomsg_rpc_vhost:
- name: /trove
state: "{{ trove_guest_oslomsg_rabbit_quorum_queues | ternary('absent', 'present') }}"
@ -223,6 +226,7 @@ trove_guest_oslomsg_notify_password: "{{ trove_oslomsg_notify_password }}"
trove_guest_oslomsg_notify_vhost: "{{ trove_guest_oslomsg_rpc_vhost }}"
trove_guest_oslomsg_notify_ssl_version: "{{ trove_oslomsg_notify_ssl_version }}"
trove_guest_oslomsg_notify_ssl_ca_file: "{{ trove_oslomsg_notify_ssl_ca_file }}"
trove_guest_oslomsg_notify_policies: []
# Trove image settings.
# Set the directory where the downloaded images will be stored

View File

@ -77,11 +77,13 @@
_oslomsg_rpc_password: "{{ trove_oslomsg_rpc_password }}"
_oslomsg_rpc_vhost: "{{ trove_oslomsg_rpc_vhost }}"
_oslomsg_rpc_transport: "{{ trove_oslomsg_rpc_transport }}"
_oslomsg_rpc_policies: "{{ trove_oslomsg_rpc_policies }}"
_oslomsg_notify_setup_host: "{{ trove_oslomsg_notify_setup_host }}"
_oslomsg_notify_userid: "{{ trove_oslomsg_notify_userid }}"
_oslomsg_notify_password: "{{ trove_oslomsg_notify_password }}"
_oslomsg_notify_vhost: "{{ trove_oslomsg_notify_vhost }}"
_oslomsg_notify_transport: "{{ trove_oslomsg_notify_transport }}"
_oslomsg_notify_policies: "{{ trove_oslomsg_notify_policies }}"
tags:
- always
@ -101,11 +103,13 @@
_oslomsg_rpc_password: "{{ trove_guest_oslomsg_rpc_password }}"
_oslomsg_rpc_vhost: "{{ trove_guest_oslomsg_rpc_vhost }}"
_oslomsg_rpc_transport: "{{ trove_oslomsg_rpc_transport }}"
_oslomsg_rpc_policies: "{{ trove_guest_oslomsg_rpc_policies }}"
_oslomsg_notify_setup_host: "{{ trove_guest_notify_host_group }}"
_oslomsg_notify_userid: "{{ trove_guest_oslomsg_notify_userid }}"
_oslomsg_notify_password: "{{ trove_guest_oslomsg_notify_password }}"
_oslomsg_notify_vhost: "{{ trove_guest_oslomsg_notify_vhost }}"
_oslomsg_notify_transport: "{{ trove_oslomsg_notify_transport }}"
_oslomsg_notify_policies: "{{ trove_guest_oslomsg_notify_policies }}"
tags:
- always