From 5ad37dd6209c12259b0efe2204a20ee4edc82f4e Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 25 Mar 2024 14:08:20 +0100 Subject: [PATCH] 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: I69fee673ebc1fa454a4af0f9a251e9f50999edd8 --- defaults/main.yml | 2 ++ tasks/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 1b0c0551..440ac814 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -98,6 +98,7 @@ cinder_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}" cinder_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}" cinder_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}" cinder_oslomsg_rpc_userid: cinder +cinder_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 `/`. cinder_oslomsg_rpc_vhost: @@ -120,6 +121,7 @@ cinder_oslomsg_notify_password: "{{ cinder_oslomsg_rpc_password }}" cinder_oslomsg_notify_vhost: "{{ cinder_oslomsg_rpc_vhost }}" cinder_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}" cinder_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}" +cinder_oslomsg_notify_policies: [] ## RabbitMQ integration cinder_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}" diff --git a/tasks/main.yml b/tasks/main.yml index 6b7246a2..a8cdda6f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -80,11 +80,13 @@ _oslomsg_rpc_password: "{{ cinder_oslomsg_rpc_password }}" _oslomsg_rpc_vhost: "{{ cinder_oslomsg_rpc_vhost }}" _oslomsg_rpc_transport: "{{ cinder_oslomsg_rpc_transport }}" + _oslomsg_rpc_policies: "{{ cinder_oslomsg_rpc_policies }}" _oslomsg_notify_setup_host: "{{ cinder_oslomsg_notify_setup_host }}" _oslomsg_notify_userid: "{{ cinder_oslomsg_notify_userid }}" _oslomsg_notify_password: "{{ cinder_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ cinder_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ cinder_oslomsg_notify_transport }}" + _oslomsg_notify_policies: "{{ cinder_oslomsg_notify_policies }}" tags: - always