forked from infra/ansible
kea: add ddns support
This commit is contained in:
parent
06a8052353
commit
4b0b8adcdd
@ -3,5 +3,8 @@
|
|||||||
- name: Restart kea-dhcp4-server
|
- name: Restart kea-dhcp4-server
|
||||||
service: name=kea-dhcp4-server state=restarted
|
service: name=kea-dhcp4-server state=restarted
|
||||||
|
|
||||||
|
- name: Restart kea-dhcp-ddns-server
|
||||||
|
service: name=kea-dhcp-ddns-server state=restarted
|
||||||
|
|
||||||
- name: Restart kea-ctrl-agent
|
- name: Restart kea-ctrl-agent
|
||||||
service: name=kea-ctrl-agent state=restarted
|
service: name=kea-ctrl-agent state=restarted
|
||||||
|
@ -14,9 +14,19 @@
|
|||||||
# validate: kea-dhcp4 -t %s
|
# validate: kea-dhcp4 -t %s
|
||||||
notify: Restart kea-dhcp4-server
|
notify: Restart kea-dhcp4-server
|
||||||
|
|
||||||
- name: Start the kea dhcp server
|
- name: Start the kea dhcp4 server
|
||||||
service: name=kea-dhcp4-server state=started enabled=yes
|
service: name=kea-dhcp4-server state=started enabled=yes
|
||||||
|
|
||||||
|
- name: Configure the kea dhcp-ddns server
|
||||||
|
template:
|
||||||
|
src: kea/kea-dhcp-ddns.conf.j2
|
||||||
|
dest: /etc/kea/kea-dhcp-ddns.conf
|
||||||
|
# validate: kea-dhcp-ddns -t %s
|
||||||
|
notify: Restart kea-dhcp-ddns-server
|
||||||
|
|
||||||
|
- name: Start the kea dhcp-ddns server
|
||||||
|
service: name=kea-dhcp-ddns-server state=started enabled=yes
|
||||||
|
|
||||||
- name: Configure the kea control agent
|
- name: Configure the kea control agent
|
||||||
template:
|
template:
|
||||||
src: kea/kea-ctrl-agent.conf.j2
|
src: kea/kea-ctrl-agent.conf.j2
|
||||||
|
38
roles/kea/templates/kea/kea-dhcp-ddns.conf.j2
Normal file
38
roles/kea/templates/kea/kea-dhcp-ddns.conf.j2
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"DhcpDdns": {
|
||||||
|
"ip-address": "127.0.0.1",
|
||||||
|
"port": 53001,
|
||||||
|
"control-socket": {
|
||||||
|
"socket-type": "unix",
|
||||||
|
"socket-name": "/run/kea/kea-ddns-ctrl-socket"
|
||||||
|
},
|
||||||
|
|
||||||
|
"forward-ddns": {
|
||||||
|
"ddns-domains": [
|
||||||
|
{
|
||||||
|
"name": "users.binary.kitchen.",
|
||||||
|
"dns-servers": [
|
||||||
|
{ "ip-address": "{{ dns_primary }}" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"reverse-ddns": {
|
||||||
|
},
|
||||||
|
|
||||||
|
"loggers": [
|
||||||
|
{
|
||||||
|
"name": "kea-dhcp4",
|
||||||
|
"output_options": [
|
||||||
|
{
|
||||||
|
"output": "stdout",
|
||||||
|
"pattern": "%-5p %m\n"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"severity": "INFO",
|
||||||
|
"debuglevel": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -10,6 +10,17 @@
|
|||||||
"socket-name": "/run/kea/kea4-ctrl-socket"
|
"socket-name": "/run/kea/kea4-ctrl-socket"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"dhcp-ddns": {
|
||||||
|
"enable-updates": true,
|
||||||
|
"server-ip": "127.0.0.1",
|
||||||
|
"server-port": 53001,
|
||||||
|
"sender-ip": "",
|
||||||
|
"sender-port": 0,
|
||||||
|
"max-queue-size": 1024,
|
||||||
|
"ncr-protocol": "UDP",
|
||||||
|
"ncr-format": "JSON"
|
||||||
|
},
|
||||||
|
|
||||||
"hooks-libraries": [
|
"hooks-libraries": [
|
||||||
{
|
{
|
||||||
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so"
|
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so"
|
||||||
@ -254,6 +265,14 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"ddns-send-updates": true,
|
||||||
|
"ddns-override-client-update": true,
|
||||||
|
"ddns-override-no-update": true,
|
||||||
|
"ddns-qualifying-suffix": "users.binary.kitchen",
|
||||||
|
"ddns-generated-prefix": "dhcp",
|
||||||
|
"ddns-replace-client-name": "when-not-present",
|
||||||
|
"ddns-update-on-renew": true,
|
||||||
|
|
||||||
"reservations": [
|
"reservations": [
|
||||||
{
|
{
|
||||||
"hw-address": "b8:27:eb:18:5c:11",
|
"hw-address": "b8:27:eb:18:5c:11",
|
||||||
|
Loading…
Reference in New Issue
Block a user