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
This commit is contained in:
Jonathan Rosser 2022-08-01 14:27:09 +01:00
parent e02da14854
commit 8601bbc4a0

View File

@ -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