1
0
forked from infra/ansible
infra/roles/dns_intern/tasks/main.yml
Markus Hauschild e8dcf169e2 dhcpd, dns_intern: provide dynamic dns entries
clients in the 172.23.3.0/24 subnet are now provided with dynamic dns
entries in the users.binary.kitchen domain - forward entries only
2021-05-16 18:35:29 +02:00

39 lines
893 B
YAML

---
- name: Install powerdns
apt:
name:
- dnsdist
- pdns-server
- pdns-recursor
- name: Create zone directory
file: path=/etc/powerdns/bind/ state=directory
- name: Configure powerdns
template: src={{ item }}.j2 dest=/etc/powerdns/{{ item }}
notify: Restart powerdns
with_items:
- pdns.conf
- recursor.conf
- bindbackend.conf
- bind/23.172.in-addr.arpa.zone
- bind/binary.kitchen.zone
# TODO
# Initialize zone users.binary.kitchen using pdnsutil or SQL on the master
# TODO
# Initialize zone users.binary.kitchen using "pdnsutil create-slave-zone users.binary.kitchen 172.23.2.3" on the slave
- name: Configure dnsdist
template: src=dnsdist.conf.j2 dest=/etc/dnsdist/dnsdist.conf
notify: Restart dnsdist
- name: Start the powerdns services
service: name={{ item }} state=started enabled=yes
with_items:
- dnsdist
- pdns
- pdns-recursor