update knot role to support more operational variety

Now secondary zones, dynamic zones, interpeted catalog zones, etc.
are supported by our knot role
This commit is contained in:
lilly 2026-09-11 10:09:48 +02:00
commit 4bdd36b8f7
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
8 changed files with 264 additions and 61 deletions

View file

@ -22,7 +22,7 @@
- name: Deploy configured zones
become: true
notify: reload knot
loop: "{{ knot__zones }}"
loop: "{{ knot__primary_zones }}"
loop_control:
label: "{{ item.domain }}"
vars:
@ -34,17 +34,3 @@
group: knot
mode: u=rw,g=r
validate: "kzonecheck -v -o '{{ item.domain }}' %s"
# this seems weird but hear me out:
# if we don't disable SLAAC, the node automatically gets an address based on IPv6 Router-Advertisements
# this results in outgoing zone transfers failing because knot will prefer to use the dynamic address over the statically configured one.
# so because we are configuring a DNS Nameserver where known IP-Addresses are actually important for ACL reasons, SLAAC is disabled
- name: Disable IPv6 SLAAC
become: true
notify: netplan apply
ansible.builtin.template:
src: "netplan-disable-ra.yaml"
dest: "/etc/netplan/10-disable-ra.yaml"
owner: root
group: root
mode: u=rw,g=,o=

View file

@ -1,4 +1,7 @@
---
- ansible.builtin.import_tasks: 01-install.yaml # noqa: name[missing]
- ansible.builtin.import_tasks: 02-configure.yaml # noqa: name[missing]
- ansible.builtin.import_tasks: 03-configure-exporter.yaml # noqa: name[missing]
- tags: [ knot ]
block:
- ansible.builtin.import_tasks: 01-install.yaml # noqa: name[missing]
- ansible.builtin.import_tasks: 02-configure.yaml # noqa: name[missing]
- ansible.builtin.include_tasks: 03-configure-exporter.yaml # noqa: name[missing]
when: knot__deploy_prometheus_exporter