From 5525538be1a8240fc28c0a09b8cd2be4704ecdf4 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 10 May 2024 14:28:09 +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: If239bee6267b983cf335c37ce9fb26bd352a3921 --- defaults/main.yml | 2 ++ tasks/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 7677fc1d..666cc53e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -262,6 +262,7 @@ neutron_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}" neutron_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}" neutron_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}" neutron_oslomsg_rpc_userid: neutron +neutron_oslomsg_rpc_policies: [] neutron_oslomsg_rpc_vhost: - name: /neutron state: "{{ neutron_oslomsg_rabbit_quorum_queues | ternary('absent', 'present') }}" @@ -284,6 +285,7 @@ neutron_oslomsg_notify_password: "{{ neutron_oslomsg_rpc_password }}" neutron_oslomsg_notify_vhost: "{{ neutron_oslomsg_rpc_vhost }}" neutron_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}" neutron_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}" +neutron_oslomsg_notify_policies: [] ### ### (Qdrouterd) integration diff --git a/tasks/main.yml b/tasks/main.yml index 15037486..e38f16ca 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -74,11 +74,13 @@ _oslomsg_rpc_password: "{{ neutron_oslomsg_rpc_password }}" _oslomsg_rpc_vhost: "{{ neutron_oslomsg_rpc_vhost }}" _oslomsg_rpc_transport: "{{ neutron_oslomsg_rpc_transport }}" + _oslomsg_rpc_policies: "{{ neutron_oslomsg_rpc_policies }}" _oslomsg_notify_setup_host: "{{ neutron_oslomsg_notify_setup_host }}" _oslomsg_notify_userid: "{{ neutron_oslomsg_notify_userid }}" _oslomsg_notify_password: "{{ neutron_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ neutron_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ neutron_oslomsg_notify_transport }}" + _oslomsg_notify_policies: "{{ neutron_oslomsg_notify_policies }}" tags: - always