Files
ansible-pull/roles/nameserver/tasks/main.yml

35 lines
1.0 KiB
YAML

# Load distro-specific variables
- include_vars: "{{ ansible_distribution | lower }}.yml"
tags: always
- block:
- block:
- include_tasks: install_unbound.yml
- include_tasks: configure_unbound_snmpd.yml
when:
- unbound is defined
- unbound == true
- powerdns is not defined or powerdns_recursor != true
- 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
- 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
rescue:
- set_fact: task_failed=true