29 lines
581 B
YAML
29 lines
581 B
YAML
---
|
|
|
|
- name: Install powerdns
|
|
apt: name={{ item }}
|
|
with_items:
|
|
- pdns-backend-bind
|
|
- pdns-recursor
|
|
- pdns-server
|
|
|
|
- name: Create zone directory
|
|
file: path=/etc/powerdns/bind/ state=directory
|
|
|
|
- name: Configure powerdns
|
|
template: src={{ item }}.j2 dest=/etc/powerdns/{{ item }}
|
|
tags: dns
|
|
notify: Restart powerdns
|
|
with_items:
|
|
- bind/ffrgb.zone
|
|
- bind/90.10.in-addr.arpa.zone
|
|
- bindbackend.conf
|
|
- pdns.conf
|
|
- recursor.conf
|
|
|
|
- name: Start the powerdns services
|
|
service: name={{ item }} state=started enabled=yes
|
|
with_items:
|
|
- pdns
|
|
- pdns-recursor
|