From fa67e0e01d1d7c780dbed1bb249f0e0251daeb9b Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 3 May 2024 20:32:10 +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: Ifbda391bf0c91a51ecea5e78ba7311e3d64c8ffc --- defaults/main.yml | 2 ++ tasks/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index f96b084..3c4c26d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -92,6 +92,7 @@ manila_oslomsg_rpc_vhost: state: "{{ manila_oslomsg_rabbit_quorum_queues | ternary('present', 'absent') }}" manila_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2') }}" manila_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}" +manila_oslomsg_rpc_policies: [] # Notify manila_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}" @@ -105,6 +106,7 @@ manila_oslomsg_notify_password: "{{ manila_oslomsg_rpc_password }}" manila_oslomsg_notify_vhost: "{{ manila_oslomsg_rpc_vhost }}" manila_oslomsg_notify_ssl_version: "{{ oslomsg_notify_ssl_version | default('TLSv1_2') }}" manila_oslomsg_notify_ssl_ca_file: "{{ oslomsg_notify_ssl_ca_file | default('') }}" +manila_oslomsg_notify_policies: [] ## RabbitMQ integration manila_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}" diff --git a/tasks/main.yml b/tasks/main.yml index df25090..11c33d1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -110,11 +110,13 @@ _oslomsg_rpc_password: "{{ manila_oslomsg_rpc_password }}" _oslomsg_rpc_vhost: "{{ manila_oslomsg_rpc_vhost }}" _oslomsg_rpc_transport: "{{ manila_oslomsg_rpc_transport }}" + _oslomsg_rpc_policies: "{{ manila_oslomsg_rpc_policies }}" _oslomsg_notify_setup_host: "{{ manila_oslomsg_notify_setup_host }}" _oslomsg_notify_userid: "{{ manila_oslomsg_notify_userid }}" _oslomsg_notify_password: "{{ manila_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ manila_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ manila_oslomsg_notify_transport }}" + _oslomsg_notify_policies: "{{ manila_oslomsg_notify_policies }}" tags: - always