added names to blocks

This commit is contained in:
2024-07-22 16:47:54 +02:00
parent 863b7ec9dc
commit a8b67bf4ad
2 changed files with 23 additions and 20 deletions

View File

@@ -41,4 +41,4 @@
state: present
line: "extend bind /etc/snmp/bind"
insertafter: "# SECTION: Extends"
notify: restart_snmpd
notify: restart_snmpd

View File

@@ -4,32 +4,35 @@
- block:
- block:
- include_tasks: install_unbound.yml
- include_tasks: configure_unbound_snmpd.yml
when:
- unbound is defined
- unbound == true
- powerdns_recursor is not defined or powerdns_recursor != true
- name: nameserver | unbound | install and configure
include_tasks: install_unbound.yml
include_tasks: configure_unbound_snmpd.yml
when:
- unbound is defined
- unbound == true
- powerdns_recursor is not defined or powerdns_recursor == false
- name: nameserver | unbound | disable systemd-resolved
include_tasks: disable-systemd-resolved.yml
when: bind == true or unbound == true or powerdns_recursor == true
- block:
- include_tasks: install_bind.yml
- include_tasks: configure_bind_snmpd.yml
when:
- bind is defined
- bind == true
- powerdns_auth is not defined or powerdns_auth != true
- name: nameserver | bind | install and configure
include_tasks: install_bind.yml
include_tasks: configure_bind_snmpd.yml
when:
- bind is defined
- bind == true
- powerdns_auth is not defined or powerdns_auth == false
- block:
- include_tasks: install_powerdns_recursor.yml
- include_tasks: configure_powerdns_recursor_snmpd.yml
when:
- powerdns_recursor is defined
- powerdns_recursor == true
- unbound is not defined or unbound != true
- name: nameserver | powerdns-recursor | install and configure
include_tasks: install_powerdns_recursor.yml
include_tasks: configure_powerdns_recursor_snmpd.yml
when:
- powerdns_recursor is defined
- powerdns_recursor == true
- unbound is not defined or unbound == false
rescue:
- set_fact: task_failed=true
- set_fact: task_failed=true