ansible-ffrgb/roles/dns/tasks/main.yml

28 lines
557 B
YAML
Raw Normal View History

2017-03-26 22:46:35 +02:00
---
- name: Install powerdns
apt: name={{ item }}
2017-03-26 22:46:35 +02:00
with_items:
2018-01-18 12:47:56 +01:00
- pdns-backend-bind
2017-03-26 22:46:35 +02:00
- pdns-recursor
2018-01-18 12:47:56 +01:00
- pdns-server
- name: Create zone directory
file: path=/etc/powerdns/bind/ state=directory
2017-03-26 22:46:35 +02:00
- name: Configure powerdns
2017-04-05 22:02:56 +02:00
template: src={{ item }}.j2 dest=/etc/powerdns/{{ item }}
2017-03-26 22:46:35 +02:00
tags: dns
notify: Restart powerdns
with_items:
2018-01-18 12:47:56 +01:00
- bind/ffrgb.zone
- bindbackend.conf
- pdns.conf
2017-03-26 22:46:35 +02:00
- recursor.conf
- name: Start the powerdns services
2017-04-05 22:02:56 +02:00
service: name={{ item }} state=started enabled=yes
2017-03-26 22:46:35 +02:00
with_items:
2018-01-18 12:47:56 +01:00
- pdns
2017-03-26 22:46:35 +02:00
- pdns-recursor