From 8601bbc4a04cc0209a2eafa72a783d7c709db9b9 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Mon, 1 Aug 2022 14:27:09 +0100 Subject: [PATCH] Install only the required dhcp config files for inspector There is a choice of dnsmasq or isc-dhcpd from the role defaults, only install the config file for the one that is in use. Change-Id: I2ab5709789582c5de4b703e78c8ddd9672fc5ca8 --- tasks/ironic_inspector_pre_install.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/ironic_inspector_pre_install.yml b/tasks/ironic_inspector_pre_install.yml index a0fb7fc5..8c2f651c 100644 --- a/tasks/ironic_inspector_pre_install.yml +++ b/tasks/ironic_inspector_pre_install.yml @@ -17,6 +17,7 @@ template: src: "dhcpd.conf.j2" dest: "/etc/dhcp/dhcpd.conf" + when: ironic_inspector_dhcp_type == "isc_dhcp" notify: - Restart isc-dhcp-server @@ -27,6 +28,7 @@ owner: "{{ ironic_system_user_name }}" group: "{{ ironic_system_group_name }}" mode: "0640" + when: ironic_inspector_dhcp_type == "dnsmasq" notify: - Restart ironic-inspector-dnsmasq