diff --git a/defaults/main.yml b/defaults/main.yml index e754e055..41a103d9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -121,6 +121,11 @@ neutron_dns_domain: "{{ dhcp_domain | default('openstacklocal.') }}" # dhcp-option-force: "26,1500" neutron_dhcp_config: {} +# Dnsmasq has furthermore some options in its configuration that are not +# key/value pairs but just options. A deployer can configure those with this +# list: +neutron_dhcp_config_list: [] + # Disable dnsmasq to resolve DNS via local resolv.conf. # When dnsmasq_dns_servers are not set, # and neutron_dnsmasq_noresolv is set to True, dnsmasq will reply with diff --git a/releasenotes/notes/neutron-dhcp-config-list-3e9354e5da138b53.yaml b/releasenotes/notes/neutron-dhcp-config-list-3e9354e5da138b53.yaml new file mode 100644 index 00000000..bcce4514 --- /dev/null +++ b/releasenotes/notes/neutron-dhcp-config-list-3e9354e5da138b53.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + You can configure options for dnsmasq by adding those to the newly + introduced ``neutron_dhcp_config_list`` list. This helps to configure e.g. + ``no-negcache`` to get around + https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1974230. diff --git a/templates/dnsmasq-neutron.conf.j2 b/templates/dnsmasq-neutron.conf.j2 index 15263dac..8d7db032 100644 --- a/templates/dnsmasq-neutron.conf.j2 +++ b/templates/dnsmasq-neutron.conf.j2 @@ -3,6 +3,9 @@ {% for key, value in neutron_dhcp_config.items() %} {{ key }}={{ value }} {% endfor %} +{% for option in neutron_dhcp_config_list %} +{{ option }} +{% endfor %} user={{ neutron_system_user_name }} {% if neutron_dnsmasq_noresolv %} no-resolv