diff --git a/defaults/main.yml b/defaults/main.yml index 051b5be1..accc2989 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -135,6 +135,9 @@ horizon_simple_ip_management: True # To enable ha router support in horizon set to True horizon_enable_ha_router: False +# Provide default DNS servers to use when a subnet is created. +horizon_default_dns_nameservers: [] + # DISALLOW_IFRAME_EMBED can be used to prevent Horizon from being embedded # within an iframe. Legacy browsers are still vulnerable to a Cross-Frame # Scripting (XFS) vulnerability, so this option allows extra security hardening diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 71294108..b615743b 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -315,7 +315,18 @@ OPENSTACK_NEUTRON_NETWORK = { # port. # VNIC types include 'normal', 'macvtap' and 'direct'. # Set to empty list or None to disable VNIC type selection. - 'supported_vnic_types': ['*'] + 'supported_vnic_types': ['*'], + + {% if horizon_default_dns_nameservers is defined %} + # Default DNS servers you would like to use when a subnet is created. + # This is only a default. Users can still choose a different list of + # dns servers. + 'default_dns_nameservers': [ + {% for item in horizon_default_dns_nameservers %} + '{{ item }}', + {% endfor %} + ] + {% endif %} } # The OPENSTACK_HEAT_STACK settings can be used to disable password