WIP: new z9 ccchh router #98
5 changed files with 22 additions and 29 deletions
unbound(role): use existing deploy_systemd_resolved_config role and some reordering
commit
0a74ac02c2
|
|
@ -17,6 +17,9 @@ all:
|
||||||
z9-router:
|
z9-router:
|
||||||
|
bitwhisker marked this conversation as resolved
Outdated
|
|||||||
ansible_host: z9-router.ccchh.net
|
ansible_host: z9-router.ccchh.net
|
||||||
ansible_user: chaos
|
ansible_user: chaos
|
||||||
|
base_config_hosts:
|
||||||
|
hosts:
|
||||||
|
z9-router:
|
||||||
certbot_hosts:
|
certbot_hosts:
|
||||||
hosts:
|
hosts:
|
||||||
dooris:
|
dooris:
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,3 @@
|
||||||
name: prometheus-unbound-exporter.service
|
name: prometheus-unbound-exporter.service
|
||||||
state: restarted
|
state: restarted
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
- name: prometheus-unbound-exporter.enabled
|
|
||||||
become: true
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
name: prometheus-unbound-exporter.service
|
|
||||||
enabled: true
|
|
||||||
daemon_reload: true
|
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,6 @@
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: unbound
|
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
|
- name: ensure correct directory permissions
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|
@ -40,23 +35,10 @@
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
- name: disable systemd-resolved
|
- name: disable systemd-resolved
|
||||||
become: true
|
|
||||||
when: unbound_disable_systemd_networkd
|
when: unbound_disable_systemd_networkd
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.include_role:
|
||||||
name: systemd-resolved.service
|
name: deploy_systemd_resolved_config
|
||||||
state: stopped
|
vars_from: deploy_systemd_resolved_config
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
|
bitwhisker marked this conversation as resolved
Outdated
june
commented
We have a nice role for managing systemd-resolved already, so no need to duplicate functionality here. 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
|
- name: install and configure prometheus-exporter for unbound
|
||||||
ansible.builtin.import_tasks: prometheus-exporter.yml
|
ansible.builtin.import_tasks: prometheus-exporter.yml
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,13 @@
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
|
june
commented
There's no There's no `unbound-prometheus-exporter` package on Debian.
|
|||||||
name: prometheus-unbound-exporter
|
name: prometheus-unbound-exporter
|
||||||
notify: prometheus-unbound-exporter.enabled
|
|
||||||
|
bitwhisker marked this conversation as resolved
Outdated
june
commented
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
|
- name: configure unbound exporter
|
||||||
become: true
|
become: true
|
||||||
|
|
|
||||||
9
roles/unbound/vars/deploy_systemd_resolved_config.yaml
Normal file
9
roles/unbound/vars/deploy_systemd_resolved_config.yaml
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue
It's fine, just feel like
rt1is one of those obscure names again, which gives more trouble than benefit.do you have an idea/a proposal for a better name?
maybe z9-router or something like that?
I would say it would not be a good idea to name it just router,
because of the indirect name collision with the chaosknoten router.
Oh, that totally makes sense. I'm fine with the name, if others really like it, but personally I would prefer something like
z9-routerindeed.