initial commit
This commit is contained in:
commit
536df4f7dd
5 changed files with 653 additions and 0 deletions
41
tasks/main.yml
Normal file
41
tasks/main.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
- name: install powerdns
|
||||
apt: pkg="pdns-server"
|
||||
|
||||
- name: copy powerdns config
|
||||
template:
|
||||
src: pdns.conf.j2
|
||||
dest: /etc/powerdns/pdns.conf
|
||||
notify:
|
||||
- restart powerdns
|
||||
|
||||
- name: copy powerdns backend config
|
||||
template:
|
||||
src: bindbackend.conf.j2
|
||||
dest: /etc/powerdns/bindbackend.conf
|
||||
notify:
|
||||
- restart powerdns
|
||||
|
||||
- name: create folders
|
||||
file:
|
||||
path: "{{item}}"
|
||||
state: directory
|
||||
owner: pdns
|
||||
group: pdns
|
||||
mode: 0755
|
||||
with_items:
|
||||
- "/etc/powerdns/tpl/"
|
||||
- "/etc/powerdns/zones/"
|
||||
|
||||
- name: create zonefile template
|
||||
template:
|
||||
src: zonefile.db.j2
|
||||
dest: "/etc/powerdns/tpl/{{ item }}"
|
||||
with_items: "{{ dnsserver.zones.keys() }}"
|
||||
register: zonefilestask
|
||||
notify:
|
||||
- copy zone
|
||||
- set zone serial
|
||||
- reload changed zones
|
||||
- purge cache
|
||||
- notify slaves
|
||||
Loading…
Add table
Add a link
Reference in a new issue