Add service policies defenition

In order to allow definition of policies per service, we need to add variables
to 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: If86fd8990138a71a452b6f34f5dc1206834553af
This commit is contained in:
Dmitriy Rabotyagov 2024-05-03 20:43:14 +02:00 committed by Dmitriy Rabotyagov
parent e164cd56d8
commit 069b5a2ae9
2 changed files with 4 additions and 0 deletions

View File

@ -174,6 +174,7 @@ zun_oslomsg_rpc_vhost:
state: "{{ zun_oslomsg_rabbit_quorum_queues | ternary('present', 'absent') }}" state: "{{ zun_oslomsg_rabbit_quorum_queues | ternary('present', 'absent') }}"
zun_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2') }}" zun_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2') }}"
zun_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}" zun_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}"
zun_oslomsg_rpc_policies: []
# Notify # Notify
zun_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}" zun_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
@ -187,6 +188,7 @@ zun_oslomsg_notify_password: "{{ zun_oslomsg_rpc_password }}"
zun_oslomsg_notify_vhost: "{{ zun_oslomsg_rpc_vhost }}" zun_oslomsg_notify_vhost: "{{ zun_oslomsg_rpc_vhost }}"
zun_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}" zun_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}"
zun_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}" zun_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}"
zun_oslomsg_notify_policies: []
## RabbitMQ integration ## RabbitMQ integration
zun_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}" zun_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}"

View File

@ -98,12 +98,14 @@
_oslomsg_rpc_password: "{{ zun_oslomsg_rpc_password }}" _oslomsg_rpc_password: "{{ zun_oslomsg_rpc_password }}"
_oslomsg_rpc_vhost: "{{ zun_oslomsg_rpc_vhost }}" _oslomsg_rpc_vhost: "{{ zun_oslomsg_rpc_vhost }}"
_oslomsg_rpc_transport: "{{ zun_oslomsg_rpc_transport }}" _oslomsg_rpc_transport: "{{ zun_oslomsg_rpc_transport }}"
_oslomsg_rpc_policies: "{{ zun_oslomsg_rpc_policies }}"
_oslomsg_notify_setup_host: "{{ zun_oslomsg_notify_setup_host }}" _oslomsg_notify_setup_host: "{{ zun_oslomsg_notify_setup_host }}"
_oslomsg_notify_userid: "{{ zun_oslomsg_notify_userid }}" _oslomsg_notify_userid: "{{ zun_oslomsg_notify_userid }}"
_oslomsg_notify_password: "{{ zun_oslomsg_notify_password }}" _oslomsg_notify_password: "{{ zun_oslomsg_notify_password }}"
_oslomsg_notify_vhost: "{{ zun_oslomsg_notify_vhost }}" _oslomsg_notify_vhost: "{{ zun_oslomsg_notify_vhost }}"
_oslomsg_notify_transport: "{{ zun_oslomsg_notify_transport }}" _oslomsg_notify_transport: "{{ zun_oslomsg_notify_transport }}"
_oslomsg_configure_notify: "{{ (zun_ceilometer_enabled | bool) or (zun_designate_enabled | bool) }}" _oslomsg_configure_notify: "{{ (zun_ceilometer_enabled | bool) or (zun_designate_enabled | bool) }}"
_oslomsg_notify_policies: "{{ zun_oslomsg_notify_policies }}"
tags: tags:
- always - always