diff --git a/defaults/main.yml b/defaults/main.yml index 89f0e523..661d7e5a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -347,15 +347,21 @@ neutron_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}" ### ### Availability zones ### -# Default availability zones do define a list of zones to where routers/agents -# will be scheduled by default. This is a list, since a deployment might stretch -# networks across AZs -neutron_default_availability_zones: [] - # Availability zone defines current AZ of the component. For OVN you can define # multiple AZs separated with a colon, ie "az1:az2" neutron_availability_zone: nova +# Default availability zones do define a list of zones to where routers/agents +# will be scheduled by default. This is a list, since a deployment might stretch +# networks across AZs. +# Default: Neutron will attempt scheduling across all defined AZs for Neutron hosts. +neutron_default_availability_zones: >- + {{ + groups['neutron_all'] | map( + 'extract', hostvars, 'neutron_availability_zone') | map( + 'default', neutron_availability_zone) | map('split', ':') | flatten | unique + }} + ### ### Telemetry integration ### diff --git a/releasenotes/notes/neutron_default_az-51715b4d836b5802.yaml b/releasenotes/notes/neutron_default_az-51715b4d836b5802.yaml new file mode 100644 index 00000000..583644cb --- /dev/null +++ b/releasenotes/notes/neutron_default_az-51715b4d836b5802.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + Changed a default value for a ``neutron_default_availability_zones`` + variable. From now on role will gather defined ``neutron_availability_zone`` + across all hosts (which defaults to `nova`) and attempt to schedule + on all available Availability Zones by default. + Change of the default should not alter behaviour for single-AZ setups.