diff --git a/defaults/main.yml b/defaults/main.yml index ff4a09d8..1a776d00 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -490,7 +490,9 @@ octavia_uwsgi_tls: # Set up the drivers # Provider agents are optional and not required for a successful Octavia provider driver # Possible options: amphora_agent, noop_agent, ovn -octavia_enabled_provider_agents: [] +octavia_enabled_provider_agents: + - "{{ (octavia_ovn_enabled | bool) | ternary('ovn', None) }}" + octavia_enabled_provider_drivers: - "amphorav2:'The Octavia Amphora v2 driver.'" - "{{ (octavia_ovn_enabled | bool) | ternary(\"ovn:'The Octavia OVN provider driver.'\", False) }}" diff --git a/templates/octavia.conf.j2 b/templates/octavia.conf.j2 index 680520af..622fc225 100644 --- a/templates/octavia.conf.j2 +++ b/templates/octavia.conf.j2 @@ -199,9 +199,10 @@ endpoint_type = {{ octavia_clients_endpoint }} region_name = {{ keystone_service_region }} valid_interfaces = {{ octavia_clients_endpoint }} -{% if octavia_enabled_provider_agents | length > 0 %} +{% set _enabled_provider_agents = octavia_enabled_provider_agents | select() %} +{% if _enabled_provider_agents | length > 0 %} [driver_agent] -enabled_provider_agents = {{ octavia_enabled_provider_agents | join(',') }} +enabled_provider_agents = {{ _enabled_provider_agents | join(',') }} {% endif %} {% if octavia_ovn_enabled %}