1
0
forked from infra/ansible
infra/roles/dns/tasks/main.yml

27 lines
566 B
YAML
Raw Normal View History

2017-01-07 15:41:21 +01:00
---
- name: Install powerdns
2018-04-22 12:07:42 +02:00
apt: name={{ item }}
2017-01-07 15:41:21 +01:00
with_items:
- pdns-server
- pdns-recursor
- name: Create zone directory
file: path=/etc/powerdns/bind/ state=directory
- name: Configure powerdns
2018-04-22 12:07:42 +02:00
template: src={{ item }}.j2 dest=/etc/powerdns/{{ item }}
2017-01-07 15:41:21 +01:00
notify: Restart powerdns
with_items:
- pdns.conf
- recursor.conf
- bindbackend.conf
- bind/23.172.in-addr.arpa.zone
- bind/binary.kitchen.zone
- name: Start the powerdns services
2018-04-22 12:07:42 +02:00
service: name={{ item }} state=started enabled=yes
2017-01-07 15:41:21 +01:00
with_items:
- pdns
- pdns-recursor