forked from redhat-cop/ocp4-helpernode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dhcpd.conf.j2
54 lines (50 loc) · 1.83 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
42
43
44
45
46
47
48
49
50
51
52
53
54
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 }};
{% if dhcp.dns is defined and dhcp.dns != "" %}
option domain-name-servers {{ dhcp.dns }};
option domain-search "{{ dns.clusterid }}.{{ dns.domain | lower }}", "{{ dns.domain | lower }}";
{% else %}
option domain-name-servers {{ helper.ipaddr }};
{% endif %}
option domain-name "{{ dns.clusterid }}.{{ dns.domain | lower }}";
subnet {{ dhcp.ipid }} netmask {{ dhcp.netmaskid }} {
interface {{ networkifacename }};
pool {
range {{ dhcp.poolstart }} {{ dhcp.poolend }};
{% if not ipi %}
# Static entries
{% if bootstrap is defined %}
host {{ bootstrap.name | lower }} { hardware ethernet {{ bootstrap.macaddr }}; fixed-address {{ bootstrap.ipaddr }}; }
{% endif %}
{% for m in masters %}
host {{ m.name | lower }} { hardware ethernet {{ m.macaddr }}; fixed-address {{ m.ipaddr }}; }
{% endfor %}
{% if workers is defined %}
{% for w in workers %}
host {{ w.name | lower }} { hardware ethernet {{ w.macaddr }}; fixed-address {{ w.ipaddr }}; }
{% endfor %}
{% endif %}
{% endif %}
{% if other is defined %}
{% for o in other %}
host {{ o.name }} { hardware ethernet {{ o.macaddr }}; fixed-address {{ o.ipaddr }}; }
{% endfor %}
{% endif %}
{% if not ipi %}
# this will not give out addresses to hosts not listed above
deny unknown-clients;
{% endif %}
# 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 }};
}
}