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 state: present
line: "extend bind /etc/snmp/bind" line: "extend bind /etc/snmp/bind"
insertafter: "# SECTION: Extends" insertafter: "# SECTION: Extends"
notify: restart_snmpd notify: restart_snmpd

View File

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