WIP: new z9 ccchh router #98

Draft
bitwhisker wants to merge 23 commits from new_ccchh_router into main
5 changed files with 22 additions and 29 deletions
Showing only changes of commit e649933337 - Show all commits

unbound(role): use existing deploy_systemd_resolved_config role and some reordering

bitwhisker 2026-05-26 10:06:52 +02:00
Signed by: bitwhisker
SSH key fingerprint: SHA256:KybIk/tusSKao6eLGY+ILlFa1rCrzwx66/acBAcKUqE

View file

@ -18,6 +18,9 @@ all:
z9-router:
ansible_host: z9-router.ccchh.net
ansible_user: chaos
base_config_hosts:
hosts:
z9-router:
certbot_hosts:
hosts:
dooris:

View file

@ -18,10 +18,3 @@
name: prometheus-unbound-exporter.service
state: restarted
enabled: true
- name: prometheus-unbound-exporter.enabled
become: true
ansible.builtin.systemd:
name: prometheus-unbound-exporter.service
enabled: true
daemon_reload: true

View file

@ -7,11 +7,6 @@
ansible.builtin.package:
name: unbound
- name: install extra dns tooling
become: true
ansible.builtin.package:
name: [ bind ] # the bind package includes tools like dig in archlinux
- name: ensure correct directory permissions
become: true
ansible.builtin.file:
@ -40,23 +35,10 @@
enabled: true
- name: disable systemd-resolved
become: true
when: unbound_disable_systemd_networkd
ansible.builtin.systemd:
name: systemd-resolved.service
state: stopped
enabled: false
- name: configure system resolver to point to local unbound
become: true
when: unbound_disable_systemd_networkd
ansible.builtin.copy:
src: no-resolved.resolv.conf
dest: /etc/resolv.conf
owner: unbound
group: unbound
mode: u=rw,g=r,o=r
ansible.builtin.include_role:
name: deploy_systemd_resolved_config
vars_from: deploy_systemd_resolved_config
bitwhisker marked this conversation as resolved Outdated

We have a nice role for managing systemd-resolved already, so no need to duplicate functionality here.
See: 7832978ff7/roles/deploy_systemd_resolved_config

We have a nice role for managing systemd-resolved already, so no need to duplicate functionality here. See: https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/commit/7832978ff732208f2f29f04ef446c7c51076c6d1/roles/deploy_systemd_resolved_config
- name: install and configure prometheus-exporter for unbound
ansible.builtin.import_tasks: prometheus-exporter.yml

View file

@ -3,7 +3,13 @@
become: true
ansible.builtin.package:

There's no unbound-prometheus-exporter package on Debian.

There's no `unbound-prometheus-exporter` package on Debian.
name: prometheus-unbound-exporter
notify: prometheus-unbound-exporter.enabled
bitwhisker marked this conversation as resolved Outdated

I would rather move the enable and start logic into the file itself, since that's not really the job of a handler. See the main unbound setup tasks for reference.

I would rather move the enable and start logic into the file itself, since that's not really the job of a handler. See the main unbound setup tasks for reference.
- name: enable unbound prometheus exporter
become: true
ansible.builtin.systemd:
name: prometheus-unbound-exporter.service
enabled: true
daemon_reload: true
- name: configure unbound exporter
become: true

View file

@ -0,0 +1,9 @@
---
deploy_systemd_resolved_config__enable: false
deploy_systemd_resolved_config__dns:
- 127.0.0.1
deploy_systemd_resolved_config__fallback_dns: # Fux DNS Server
- 185.161.128.66
- 2a07:c481:0:4::2
- 185.161.128.67
- 2a07:c481:0:4::3