104 Commits
Author SHA1 Message Date
rene 3d6f13c94e nameserver: always deploy pdns-recursor config and restart on change
The recursor config template used 'force: no', so an already-present
/etc/powerdns/recursor.d/010-custom.conf was never updated. Hosts that had a
stale file were missing 'forward-zones-recurse = universe.local=...', which
breaks resolution of internal names (e.g. step-ca.universe.local).

Remove force: no so the template is always applied, and add a
restart_pdns_recursor handler notified on config change.
2026-10-22 18:46:03 +02:00
rene 37ff1e464e nameserver: disable systemd-resolved on powerdns_server, flush handlers before step-ca
systemd-resolved was only disabled for bind/unbound/powerdns_recursor, so a
pure PowerDNS-server host kept it running on 127.0.0.53:53. Include
powerdns_server in that condition.

Also flush pending service handlers (restart_named/unbound/pdns) before the
step-ca import so the local resolver is actually up when the root CA URL is
fetched.
2026-10-22 18:31:58 +02:00
rene 31a6a3e3d7 facts: migrate bare ansible_* facts to ansible_facts[]
ansible-core deprecates injecting top-level facts as variables
(INJECT_FACTS_AS_VARS) and will stop doing so in 2.24. Convert all
remaining bare fact references (ansible_default_ipv4/ipv6, os_family,
distribution_release, date_time, ...) to the ansible_facts[] form.

Also fixes a typo (ansbile_date_time) in the postfix backup task.
2026-10-22 18:22:34 +02:00
rene 52f2ac45e5 nameserver: fix bind statistics options (literal escapes broke named-checkconf)
The lineinfile 'line' used YAML single quotes, so '\t' and '\n' were written
literally, producing 'unknown option' errors from named-checkconf. Replace with
a blockinfile block, remove the legacy literal-escape lines on next run, and
keep validation via the named-checkconf wrapper.
2026-10-22 16:48:12 +02:00
rene d0fe8afddc fix bind snmpd validation, wireguard conditional, and step-ca import ordering
- nameserver: add named-checkconf wrapper that validates the edited fragment in
  the context of the full named.conf (lineinfile validate needs %s; isolated
  check fails on include-based configs) and surfaces BIND diagnostics on stderr
- base: make wireguard 'when' boolean-correct (ipaddr('public') returns a string)
- base/nameserver: skip step-ca import in base on nameservers (resolv.conf not
  yet 127.0.0.1) and import it in the nameserver play after DNS setup
2026-10-22 16:21:49 +02:00
rene 598506f58d fix base PPA cleanup, marker file post-run, and bind snmpd validation
- base: drop leftover apt_repository removal + equivalents debug (undefined on Ubuntu resolute), clean ansible.list via file module for all debian-based distros
- local.yml: default ansible_pull_marker_file in post-run so a cooldown end_play does not abort the run
- nameserver: validate named config against main named.conf instead of isolated %s; add named_conf to debian/archlinux vars
2026-10-22 15:58:01 +02:00
rene 450841e15c removed some systems from backup 2026-10-14 19:38:52 +02:00
rene 9fd07d57a4 switched to new facts-syntax 2026-01-12 12:31:24 +01:00
René Mewißen e1301cee49 powerdns recursor is installed in another task 2025-12-11 13:01:02 +01:00
René Mewißen c450d869ab ensure the correct pdns config for secondaries 2025-12-11 12:30:26 +01:00
René Mewißen 15ad130112 configure correct backend for powerdns secondaries 2025-12-11 12:10:25 +01:00
rene ab9f681c0d added tools for powerdns 2025-12-11 09:31:21 +01:00
rene dfd950c558 Merge branch 'master' of ssh://gitea.mewissen.site:22422/rene/ansible-pull 2025-02-26 10:24:45 +01:00
rene 2823526154 listen on all interfaces 2025-02-26 10:24:31 +01:00
rene f5c0a32ffa PowerDNS secondary 2025-02-22 17:27:57 +01:00
rene b668d71b86 prepare dns secondaries 2024-10-03 23:02:04 +02:00
rene 13080071eb pdns-recursor must run before wireguard can start 2024-08-16 17:58:44 +02:00
rene e3edcf02f9 syntax 2024-07-26 11:53:21 +02:00
rene 7e513f6c77 add docker host for accessing api 2024-07-26 11:44:05 +02:00
rene ffc44a6b12 add users for secondaries 2024-07-26 11:43:46 +02:00
rene 6170be413d loop over templates 2024-07-25 14:52:37 +02:00
rene 93b074476f task rewritten 2024-07-25 14:26:58 +02:00
rene 35b78971eb syntax 2024-07-25 12:04:20 +02:00
rene 888aa7f071 moved notify 2024-07-25 11:42:05 +02:00
rene 86f9716950 use handler to restart powerdns 2024-07-25 11:11:49 +02:00
rene a6529fa87d I don't want bind backend 2024-07-25 11:09:07 +02:00
rene 7b5d51bf81 generate or get password if not set in vars 2024-07-25 11:08:37 +02:00
rene 5d5c4bc91a import data only if database did not exist before; generate password, if not set in vars 2024-07-25 11:08:14 +02:00
rene 6d53468947 do not overwrite with template, if file already exists 2024-07-25 11:07:26 +02:00
rene df99ddea83 need to use socket for mysql 2024-07-24 13:30:29 +02:00
rene 032bcc7c0f my.cnf needed 2024-07-24 12:14:32 +02:00
rene ac4272612b Python's MySQL client needed 2024-07-24 12:03:05 +02:00
rene a7e39f9305 syntax 2024-07-24 11:46:23 +02:00
rene b6ab9db9a2 moved vars 2024-07-24 11:41:51 +02:00
rene 9477fbccb6 moved vars 2024-07-24 10:24:50 +02:00
rene ccf689b513 syntax 2024-07-24 08:42:39 +02:00
rene 5df0bc5a42 syntax 2024-07-23 19:59:29 +02:00
rene ad4f47d925 added installation for powerdns primary server 2024-07-23 19:48:32 +02:00
rene 739bd1460d added additional options 2024-07-22 18:59:15 +02:00
rene 7af871d7c7 syntax 2024-07-22 18:33:10 +02:00
rene 99e9e9cf2e of course recursor needs to listen on localhost 2024-07-22 18:22:59 +02:00
rene 0d480308d8 syntax 2024-07-22 18:15:43 +02:00
rene 8be0840799 used correct service name 2024-07-22 18:15:31 +02:00
rene e85a028927 syntax 2024-07-22 18:05:21 +02:00
rene 766bfec3f6 validation not possible yet 2024-07-22 17:52:48 +02:00
rene 99d3e16910 syntax error 2024-07-22 17:32:21 +02:00
rene 2b0c58291c type and new destination 2024-07-22 17:23:56 +02:00
rene cedbeaf5ef reordered tasks 2024-07-22 17:16:52 +02:00
rene e368d64197 use separated named config files 2024-07-22 17:15:37 +02:00
rene a681febfed gave each task a name 2024-07-22 17:04:21 +02:00