Merge "Add variable to globally control notifications enablement and disable RPC"

This commit is contained in:
Zuul 2024-05-09 08:20:54 +00:00 committed by Gerrit Code Review
commit 01c0027800
3 changed files with 7 additions and 1 deletions

View File

@ -129,6 +129,7 @@ keystone_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time |
keystone_messaging_enabled: true
# RPC
keystone_oslomsg_rpc_configure: False
keystone_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
keystone_oslomsg_rpc_setup_host: "{{ (keystone_oslomsg_rpc_host_group in groups) | ternary(groups[keystone_oslomsg_rpc_host_group][0], 'localhost') }}"
keystone_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
@ -148,6 +149,7 @@ keystone_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2
keystone_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}"
# Notify
keystone_oslomsg_notify_configure: "{{ oslomsg_notify_configure | default(keystone_ceilometer_enabled) }}"
keystone_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
keystone_oslomsg_notify_setup_host: >-
{{ (keystone_oslomsg_notify_host_group in groups) | ternary(groups[keystone_oslomsg_notify_host_group][0], 'localhost') }}

View File

@ -103,12 +103,14 @@
when:
- "_keystone_is_first_play_host"
vars:
_oslomsg_rpc_configure: "{{ keystone_oslomsg_rpc_configure }}"
_oslomsg_rpc_setup_host: "{{ keystone_oslomsg_rpc_setup_host }}"
_oslomsg_rpc_userid: "{{ keystone_oslomsg_rpc_userid }}"
_oslomsg_rpc_password: "{{ keystone_oslomsg_rpc_password }}"
_oslomsg_rpc_vhost: "{{ keystone_oslomsg_rpc_vhost }}"
_oslomsg_rpc_transport: "{{ keystone_oslomsg_rpc_transport }}"
_oslomsg_rpc_policies: "{{ keystone_oslomsg_rpc_policies }}"
_oslomsg_notify_configure: "{{ keystone_oslomsg_notify_configure }}"
_oslomsg_notify_setup_host: "{{ keystone_oslomsg_notify_setup_host }}"
_oslomsg_notify_userid: "{{ keystone_oslomsg_notify_userid }}"
_oslomsg_notify_password: "{{ keystone_oslomsg_notify_password }}"

View File

@ -23,6 +23,7 @@ notification_opt_out = {{ opt_out }}
{% endif %}
{% endif %}
{% if keystone_oslomsg_rpc_configure %}
## Oslo.Messaging RPC
transport_url = {{ keystone_oslomsg_rpc_transport }}://{% for host in keystone_oslomsg_rpc_servers.split(',') %}{{ keystone_oslomsg_rpc_userid }}:{{ keystone_oslomsg_rpc_password }}@{{ host }}:{{ keystone_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ _keystone_oslomsg_rpc_vhost_conf }}{% if keystone_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ keystone_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ keystone_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
@ -30,9 +31,10 @@ transport_url = {{ keystone_oslomsg_rpc_transport }}://{% for host in keystone_o
rabbit_quorum_queue = {{ keystone_oslomsg_rabbit_quorum_queues }}
rabbit_quorum_delivery_limit = {{ keystone_oslomsg_rabbit_quorum_delivery_limit }}
rabbit_quorum_max_memory_bytes = {{ keystone_oslomsg_rabbit_quorum_max_memory_bytes }}
{% endif %}
[oslo_messaging_notifications]
{% if keystone_ceilometer_enabled | bool %}
{% if keystone_oslomsg_notify_configure | bool %}
driver = messagingv2
{% set notification_driver = true %}
{% endif %}