diff --git a/roles/nameserver/tasks/main.yml b/roles/nameserver/tasks/main.yml index 7d382ac..3b42e7c 100644 --- a/roles/nameserver/tasks/main.yml +++ b/roles/nameserver/tasks/main.yml @@ -18,17 +18,6 @@ include_tasks: disable-systemd-resolved.yml when: bind is true or unbound is true or powerdns_recursor is true - - name: nameserver | bind | install and configure - block: - - name: nameserver | bind | install - include_tasks: install_bind.yml - - name: nameserver | bind | configure - include_tasks: configure_bind_snmpd.yml - when: - - bind is defined - - bind is true - - powerdns_auth is not defined or powerdns_auth is false - - name: nameserver | powerdns-recursor | install and configure block: - name: nameserver| powerdns-recursor | install @@ -40,5 +29,16 @@ - powerdns_recursor is true - unbound is not defined or unbound is false + - name: nameserver | bind | install and configure + block: + - name: nameserver | bind | install + include_tasks: install_bind.yml + - name: nameserver | bind | configure + include_tasks: configure_bind_snmpd.yml + when: + - bind is defined + - bind is true + - powerdns_auth is not defined or powerdns_auth is false + rescue: - set_fact: task_failed=true