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
This commit is contained in:
1 parent
598506f58d
commit
d0fe8afddc
4 files changed
+58
-2
No files matched your search
@@ -26,13 +26,21 @@
|
||||
owner: "bind"
|
||||
group: "bind"
|
||||
|
||||
- name: nameserver | snmpd | deploy named-checkconf validation wrapper
|
||||
copy:
|
||||
dest: /usr/local/bin/named-checkconf-wrapper.sh
|
||||
src: "named-checkconf-wrapper.sh"
|
||||
mode: "0755"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
|
||||
- name: nameserver | snmpd | configure named for statistics
|
||||
lineinfile:
|
||||
path: "{{ named_conf_options }}"
|
||||
state: present
|
||||
line: '\tstatistics-file "/var/cache/bind/stats";\n\tzone-statistics yes;'
|
||||
insertafter: "options {"
|
||||
validate: "{{ named_checkconf }} {{ named_conf }}"
|
||||
validate: "/usr/local/bin/named-checkconf-wrapper.sh %s {{ named_conf }} {{ named_conf_options }} {{ named_checkconf }}"
|
||||
notify: restart_named
|
||||
|
||||
- name: nameserver | snmpd | configure extend
|
||||
|
||||
@@ -51,5 +51,13 @@
|
||||
- name: Nameserver | powerdns-server | configure
|
||||
include_tasks: configure_powerdns_server_snmpd.yml
|
||||
|
||||
# Der Base-Play überspringt den step-ca Import auf Nameservern, weil deren
|
||||
# /etc/resolv.conf erst hier (nach dem DNS-Setup) auf 127.0.0.1 zeigt.
|
||||
# Jetzt ist die interne Zone auflösbar, also das Root-CA nachziehen.
|
||||
- name: Nameserver | system setup | import step-ca certificate
|
||||
include_role:
|
||||
name: base
|
||||
tasks_from: system_setup/import_stepca.yml
|
||||
|
||||
rescue:
|
||||
- set_fact: task_failed=true
|
||||
Reference in new issue
Block a user