From 762a252ba1eb22a1b7f1424dcaeeffc17162c03d Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 3 May 2024 20:07:53 +0200 Subject: [PATCH] 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: I7411f80830b6bc5d007b26ffdbb37be87c0b521a --- defaults/main.yml | 2 ++ tasks/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 8fdcaed..c56f9dc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -190,6 +190,7 @@ masakari_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}" masakari_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}" masakari_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}" masakari_oslomsg_rpc_userid: masakari +masakari_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 `/`. masakari_oslomsg_rpc_vhost: @@ -213,6 +214,7 @@ masakari_oslomsg_notify_password: "{{ masakari_oslomsg_rpc_password }}" masakari_oslomsg_notify_vhost: "{{ masakari_oslomsg_rpc_vhost }}" masakari_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}" masakari_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}" +masakari_oslomsg_notify_policies: [] ## RabbitMQ integration masakari_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}" diff --git a/tasks/main.yml b/tasks/main.yml index c137403..28a9cea 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -65,11 +65,13 @@ _oslomsg_rpc_password: "{{ masakari_oslomsg_rpc_password }}" _oslomsg_rpc_vhost: "{{ masakari_oslomsg_rpc_vhost }}" _oslomsg_rpc_transport: "{{ masakari_oslomsg_rpc_transport }}" + _oslomsg_rpc_policies: "{{ masakari_oslomsg_rpc_policies }}" _oslomsg_notify_setup_host: "{{ masakari_oslomsg_notify_setup_host }}" _oslomsg_notify_userid: "{{ masakari_oslomsg_notify_userid }}" _oslomsg_notify_password: "{{ masakari_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ masakari_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ masakari_oslomsg_notify_transport }}" + _oslomsg_notify_policies: "{{ masakari_oslomsg_notify_policies }}" tags: - always