forked from redhat-cop/ocp4-helpernode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dhcpd.conf.j2
41 lines (37 loc) · 1.37 KB
/
dhcpd.conf.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
authoritative;
ddns-update-style interim;
default-lease-time 14400;
max-lease-time 14400;
option routers {{ dhcp.router }};
option broadcast-address {{ dhcp.bcast }};
option subnet-mask {{ dhcp.netmask }};
option domain-name-servers {{ helper.ipaddr }};
option domain-name "{{ dns.clusterid }}.{{ dns.domain | lower }}";
subnet {{ dhcp.ipid }} netmask {{ dhcp.netmaskid }} {
interface {{ networkifacename }};
pool {
range {{ dhcp.poolstart }} {{ dhcp.poolend }};
# Static entries
host {{ bootstrap.name | lower }} { hardware ethernet {{ bootstrap.macaddr }}; fixed-address {{ bootstrap.ipaddr }}; }
{% for m in masters %}
host {{ m.name | lower }} { hardware ethernet {{ m.macaddr }}; fixed-address {{ m.ipaddr }}; }
{% endfor %}
{% for w in workers %}
host {{ w.name | lower }} { hardware ethernet {{ w.macaddr }}; fixed-address {{ w.ipaddr }}; }
{% endfor %}
{% if other is defined %}
{% for o in other %}
host {{ o.name }} { hardware ethernet {{ o.macaddr }}; fixed-address {{ o.ipaddr }}; }
{% endfor %}
{% endif %}
# this will not give out addresses to hosts not listed above
deny unknown-clients;
# this is PXE specific
{% if ppc64le is sameas true %}
filename "boot/grub2/powerpc-ieee1275/core.elf";
{% else %}
filename "pxelinux.0";
{% endif %}
next-server {{ helper.ipaddr }};
}
}