forked from infra/ansible
229 lines
4.4 KiB
Django/Jinja
229 lines
4.4 KiB
Django/Jinja
# dhcpd.conf
|
|
|
|
# option definitions common to all supported networks...
|
|
option domain-name "binary.kitchen";
|
|
option domain-name-servers {{ name_servers | join(', ') }};
|
|
option ntp-servers 172.23.1.60, 172.23.2.3;
|
|
|
|
default-lease-time 7200;
|
|
max-lease-time 28800;
|
|
|
|
# Use this to enble / disable dynamic dns updates globally.
|
|
ddns-update-style none;
|
|
|
|
# If this DHCP server is the official DHCP server for the local
|
|
# network, the authoritative directive should be uncommented.
|
|
authoritative;
|
|
|
|
# Use this to send dhcp log messages to a different log file (you also
|
|
# have to hack syslog.conf to complete the redirection).
|
|
log-facility local7;
|
|
|
|
{% if dhcpd_failover == true %}
|
|
|
|
# Failover
|
|
|
|
failover peer "failover-partner" {
|
|
{% if ansible_default_ipv4.address == dhcpd_primary %}
|
|
primary;
|
|
address {{ dhcpd_primary }};
|
|
peer address {{ dhcpd_secondary }};
|
|
{% elif ansible_default_ipv4.address == dhcpd_secondary %}
|
|
secondary;
|
|
address {{ dhcpd_secondary }};
|
|
peer address {{ dhcpd_primary }};
|
|
{% endif %}
|
|
port 520;
|
|
peer port 520;
|
|
max-response-delay 60;
|
|
max-unacked-updates 10;
|
|
{% if ansible_default_ipv4.address == dhcpd_primary %}
|
|
mclt 600;
|
|
split 255;
|
|
{% endif %}
|
|
load balance max seconds 3;
|
|
}
|
|
{% endif %}
|
|
|
|
# Binary Kitchen subnets
|
|
|
|
# Management
|
|
subnet 172.23.1.0 netmask 255.255.255.0 {
|
|
option routers 172.23.1.1;
|
|
}
|
|
|
|
# Services
|
|
subnet 172.23.2.0 netmask 255.255.255.0 {
|
|
allow bootp;
|
|
option routers 172.23.2.1;
|
|
}
|
|
|
|
# Users
|
|
subnet 172.23.3.0 netmask 255.255.255.0 {
|
|
option routers 172.23.3.1;
|
|
pool {
|
|
{% if dhcpd_failover == true %}
|
|
failover peer "failover-partner";
|
|
{% endif %}
|
|
range 172.23.3.10 172.23.3.230;
|
|
}
|
|
}
|
|
|
|
# MQTT
|
|
subnet 172.23.4.0 netmask 255.255.255.0 {
|
|
option routers 172.23.4.1;
|
|
pool {
|
|
{% if dhcpd_failover == true %}
|
|
failover peer "failover-partner";
|
|
{% endif %}
|
|
range 172.23.4.10 172.23.4.240;
|
|
}
|
|
}
|
|
|
|
|
|
# Fixed IPs
|
|
|
|
host ap01 {
|
|
hardware ethernet 44:48:c1:ce:a9:00;
|
|
fixed-address ap01.binary.kitchen;
|
|
}
|
|
|
|
host ap04 {
|
|
hardware ethernet 44:48:c1:ce:90:06;
|
|
fixed-address ap04.binary.kitchen;
|
|
}
|
|
|
|
host ap05 {
|
|
hardware ethernet bc:9f:e4:c3:6f:aa;
|
|
fixed-address ap05.binary.kitchen;
|
|
}
|
|
|
|
host bowle {
|
|
hardware ethernet ac:1f:6b:25:16:b6;
|
|
fixed-address bowle.binary.kitchen;
|
|
}
|
|
|
|
host cannelloni {
|
|
hardware ethernet 00:10:f3:15:88:ac;
|
|
fixed-address cannelloni.binary.kitchen;
|
|
}
|
|
|
|
host cashdesk {
|
|
hardware ethernet 00:0b:ca:94:13:f1;
|
|
fixed-address cashdesk.binary.kitchen;
|
|
}
|
|
|
|
host fusilli {
|
|
hardware ethernet b8:27:eb:1d:b9:bf;
|
|
fixed-address fusilli.binary.kitchen;
|
|
}
|
|
|
|
host garlic {
|
|
hardware ethernet b8:27:eb:56:2b:7c;
|
|
fixed-address garlic.binary.kitchen;
|
|
}
|
|
|
|
host homer {
|
|
hardware ethernet b8:27:eb:24:b2:12;
|
|
fixed-address homer.binary.kitchen;
|
|
}
|
|
|
|
host klopi {
|
|
hardware ethernet 74:da:38:6e:e6:9d;
|
|
fixed-address klopi.binary.kitchen;
|
|
}
|
|
|
|
host lock {
|
|
hardware ethernet b8:27:eb:d8:b9:ad;
|
|
fixed-address lock.binary.kitchen;
|
|
}
|
|
|
|
host maccaroni {
|
|
hardware ethernet b8:27:eb:18:5c:11;
|
|
fixed-address maccaroni.binary.kitchen;
|
|
}
|
|
|
|
host matrix {
|
|
hardware ethernet b8:27:eb:ed:22:58;
|
|
fixed-address matrix.binary.kitchen;
|
|
}
|
|
|
|
host mirror {
|
|
hardware ethernet 74:da:38:7d:ed:84;
|
|
fixed-address mirror.binary.kitchen;
|
|
}
|
|
|
|
host mpcnc {
|
|
hardware ethernet b8:27:eb:0f:d3:8b;
|
|
fixed-address mpcnc.binary.kitchen;
|
|
}
|
|
|
|
host noodlehub {
|
|
hardware ethernet b8:27:eb:eb:e5:88;
|
|
fixed-address noodlehub.binary.kitchen;
|
|
}
|
|
|
|
host pizza {
|
|
hardware ethernet 52:54:00:17:02:21;
|
|
fixed-address pizza.binary.kitchen;
|
|
}
|
|
|
|
host punsch {
|
|
hardware ethernet 00:21:85:1b:7f:3d;
|
|
fixed-address punsch.binary.kitchen;
|
|
}
|
|
|
|
host spaghetti {
|
|
hardware ethernet b8:27:eb:e3:e9:f1;
|
|
fixed-address spaghetti.binary.kitchen;
|
|
}
|
|
|
|
host schweinshaxn {
|
|
hardware ethernet 52:54:00:17:02:24;
|
|
fixed-address schweinshaxn.binary.kitchen;
|
|
}
|
|
|
|
host strammermax {
|
|
hardware ethernet 08:00:37:B8:55:44;
|
|
fixed-address strammermax.binary.kitchen;
|
|
}
|
|
|
|
host obatzda {
|
|
hardware ethernet ec:9a:74:35:35:cf;
|
|
fixed-address obatzda.binary.kitchen;
|
|
}
|
|
|
|
|
|
# VoIP Phones
|
|
|
|
host voip01 {
|
|
hardware ethernet 00:1D:45:B6:99:2F;
|
|
option tftp-server-name "172.23.2.36";
|
|
}
|
|
|
|
host voip02 {
|
|
hardware ethernet 00:1D:A2:66:B8:3E;
|
|
option tftp-server-name "172.23.2.36";
|
|
}
|
|
|
|
host voip03 {
|
|
hardware ethernet 00:1E:BE:90:FB:DB;
|
|
option tftp-server-name "172.23.2.36";
|
|
}
|
|
|
|
host voip04 {
|
|
hardware ethernet 00:1E:BE:90:FF:06;
|
|
option tftp-server-name "172.23.2.36";
|
|
}
|
|
|
|
|
|
# OMAPI
|
|
|
|
omapi-port 7911;
|
|
omapi-key omapi_key;
|
|
|
|
key omapi_key {
|
|
algorithm hmac-md5;
|
|
secret {{ dhcp_omapi_key }};
|
|
}
|