From e85299f41320434712ba626df6f50d6ef99cda1e Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 10 May 2024 16:18:58 +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: I594514580ca7180089699914805a595c2feb965b --- defaults/main.yml | 2 ++ tasks/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 91715668..87a5ca1c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -109,6 +109,7 @@ octavia_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}" octavia_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}" octavia_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}" octavia_oslomsg_rpc_userid: octavia +octavia_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 `/`. octavia_oslomsg_rpc_vhost: @@ -132,6 +133,7 @@ octavia_oslomsg_notify_password: "{{ octavia_oslomsg_rpc_password }}" octavia_oslomsg_notify_vhost: "{{ octavia_oslomsg_rpc_vhost }}" octavia_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}" octavia_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}" +octavia_oslomsg_notify_policies: [] ## RabbitMQ integration octavia_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}" diff --git a/tasks/main.yml b/tasks/main.yml index 4cd003f7..275c8b50 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -93,11 +93,13 @@ _oslomsg_rpc_password: "{{ octavia_oslomsg_rpc_password }}" _oslomsg_rpc_vhost: "{{ octavia_oslomsg_rpc_vhost }}" _oslomsg_rpc_transport: "{{ octavia_oslomsg_rpc_transport }}" + _oslomsg_rpc_policies: "{{ octavia_oslomsg_rpc_policies }}" _oslomsg_notify_setup_host: "{{ octavia_oslomsg_notify_setup_host }}" _oslomsg_notify_userid: "{{ octavia_oslomsg_notify_userid }}" _oslomsg_notify_password: "{{ octavia_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ octavia_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ octavia_oslomsg_notify_transport }}" + _oslomsg_notify_policies: "{{ octavia_oslomsg_notify_policies }}" tags: - always