1
0
forked from infra/ansible
infra/roles/dhcpd/templates/dhcp/dhcpd.conf.j2

132 lines
2.7 KiB
Plaintext
Raw Normal View History

2017-01-21 17:55:08 +01:00
# dhcpd.conf
# option definitions common to all supported networks...
option domain-name "binary.kitchen";
option domain-name-servers {{ name_servers | join(', ') }};
option ntp-servers {{ ntp_servers | join(', ') }};
default-lease-time 3600;
max-lease-time 14400;
# 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 {}
# Services
subnet 172.23.2.0 netmask 255.255.255.0 {
2017-02-17 21:16:09 +01:00
option routers 172.23.2.1;
2017-01-21 17:55:08 +01:00
}
2017-02-21 18:47:11 +01:00
# Users
2017-01-21 17:55:08 +01:00
subnet 172.23.3.0 netmask 255.255.255.0 {
2017-01-23 19:26:35 +01:00
option routers 172.23.3.1;
2017-01-21 17:55:08 +01:00
pool {
{% if dhcpd_failover == true %}
failover peer "failover-partner";
{% endif %}
2017-01-23 15:27:07 +01:00
range 172.23.3.10 172.23.3.240;
2017-01-21 17:55:08 +01:00
}
}
2017-02-21 18:47:11 +01:00
# MQTT
2017-01-21 17:55:08 +01:00
subnet 172.23.4.0 netmask 255.255.255.0 {
2017-01-23 19:26:35 +01:00
option routers 172.23.4.1;
2017-01-21 17:55:08 +01:00
pool {
{% if dhcpd_failover == true %}
failover peer "failover-partner";
{% endif %}
2017-01-23 15:27:07 +01:00
range 172.23.4.10 172.23.4.240;
2017-01-21 17:55:08 +01:00
}
}
# Fixed IPs
2017-03-20 20:02:03 +01:00
host cannelloni {
hardware ethernet 00:10:f3:15:88:ac;
fixed-address cannelloni.binary.kitchen;
}
2017-01-21 17:55:08 +01:00
host cashdesk {
hardware ethernet 00:0b:ca:94:13:f1;
fixed-address cashdesk.binary.kitchen;
}
host homer {
hardware ethernet b8:27:eb:24:b2:12;
fixed-address homer.binary.kitchen;
}
host lock {
hardware ethernet b8:27:eb:5d:e7:6e;
fixed-address lock.binary.kitchen;
}
host matrix {
hardware ethernet b8:27:eb:ed:22:58;
fixed-address matrix.binary.kitchen;
}
2017-01-28 16:44:36 +01:00
host sushi {
hardware ethernet 52:54:00:17:02:23;
fixed-address sushi.binary.kitchen;
}
2017-01-21 17:55:08 +01:00
host punsch {
hardware ethernet 00:21:85:1b:7f:3d;
fixed-address punsch.binary.kitchen;
}
host spiegelei {
hardware ethernet 00:23:7d:79:82:8e;
fixed-address spiegelei.binary.kitchen;
}
# OMAPI
omapi-port 7911;
omapi-key omapi_key;
key omapi_key {
algorithm hmac-md5;
secret KDTrwNNyUOnGtrYo8RBjTzsE35hAjuggm5pxZD3xMuE4PdPyOkjuN/bM1uLLaIL/iGHQb/OmNsqCGqzOMSwhdA==;
}