Simplify condition on ovn_ssl configuration in ml2

There is no reason to evaluate groups condition multiple times,
as we are not placing OVN TLS configuration without more basic
config anyway. So condition evaluation can be simplified and made
more readable.

Change-Id: If33870c00cc139e0fc8de4ec69adf331f178ee9d
This commit is contained in:
Dmitriy Rabotyagov 2025-02-12 11:13:28 +01:00
parent 55c7b50e77
commit 36188e06ce

@ -51,14 +51,14 @@ enable_distributed_floating_ip = {{ neutron_ovn_distributed_fip }}
ovn_metadata_enabled = True
dns_servers = {{ neutron_dnsmasq_dns_servers }}
dhcp_default_lease_time = {{ neutron_dnsmasq_lease_max }}
{% endif %}
{% if neutron_ovn_ssl and (neutron_services['neutron-server']['group'] in group_names or neutron_services['neutron-ovn-controller']['group'] in group_names) %}
{% if neutron_ovn_ssl %}
ovn_sb_ca_cert={{ [neutron_conf_version_dir, neutron_ovn_ssl_ca_cert] | join('/') }}
ovn_sb_certificate={{ [neutron_conf_version_dir, neutron_ovn_ssl_cert] | join('/') }}
ovn_sb_private_key={{ [neutron_conf_version_dir, neutron_ovn_ssl_key] | join('/') }}
ovn_nb_ca_cert={{ [neutron_conf_version_dir, neutron_ovn_ssl_ca_cert] | join('/') }}
ovn_nb_certificate={{ [neutron_conf_version_dir, neutron_ovn_ssl_cert] | join('/') }}
ovn_nb_private_key={{ [neutron_conf_version_dir, neutron_ovn_ssl_key] | join('/') }}
{% endif %}
{% endif %}
{% endif %}
# Security groups