From a3f1ded357e8a08f3a39e20723a5727fb8d97d3c Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 27 Jun 2019 09:46:18 +0200 Subject: [PATCH] Add support for neutron custom dnsmasq.conf Change-Id: Ia7041be384ac07d0a790c2c5c68b1b31ff0e567a --- ansible/roles/neutron/tasks/config.yml | 6 +++++- .../add-neutron-custom-dnsmasq-conf-bba1ac18df0dccd4.yaml | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-neutron-custom-dnsmasq-conf-bba1ac18df0dccd4.yaml diff --git a/ansible/roles/neutron/tasks/config.yml b/ansible/roles/neutron/tasks/config.yml index 90d0ea8282..93469f968e 100644 --- a/ansible/roles/neutron/tasks/config.yml +++ b/ansible/roles/neutron/tasks/config.yml @@ -196,10 +196,14 @@ service_name: "neutron-dhcp-agent" neutron_dhcp_agent: "{{ neutron_services[service_name] }}" template: - src: "dnsmasq.conf.j2" + src: "{{ item }}" dest: "{{ node_config_directory }}/{{ service_name }}/dnsmasq.conf" mode: "0660" register: dnsmasq_conf + with_first_found: + - "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/dnsmasq.conf" + - "{{ node_custom_config }}/neutron/dnsmasq.conf" + - "dnsmasq.conf.j2" when: - neutron_dhcp_agent.enabled | bool - neutron_dhcp_agent.host_in_groups | bool diff --git a/releasenotes/notes/add-neutron-custom-dnsmasq-conf-bba1ac18df0dccd4.yaml b/releasenotes/notes/add-neutron-custom-dnsmasq-conf-bba1ac18df0dccd4.yaml new file mode 100644 index 0000000000..fdcce30206 --- /dev/null +++ b/releasenotes/notes/add-neutron-custom-dnsmasq-conf-bba1ac18df0dccd4.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The ``dnsmasq.conf`` configuration file used by the Neutron DHCP agent can be + overwritten by ``{{ node_custom_config}}/neutron/dnsmasq.conf`` or + ``{{ node_custom_config }}/neutron/{{ inventory_hostname }}/dnsmasq.conf``.