Add dns role (resolver only for now)

This commit is contained in:
Markus 2017-03-26 22:46:35 +02:00
parent 5d09fc43a8
commit 578e8ee510
7 changed files with 81 additions and 0 deletions

View File

@ -1,3 +1,6 @@
---
batman_ipv4:
address: 10.90.0.11
site_code: ffrgb_stadt

View File

@ -1,3 +1,6 @@
---
batman_ipv4:
address: 10.90.32.21
site_code: ffrgb_umland

View File

@ -1,3 +1,6 @@
---
batman_ipv4:
address: 10.90.192.31
site_code: ffrgb_test

View File

@ -0,0 +1,7 @@
---
- name: Restart powerdns
service: name={{ item }} state=restarted
with_items:
# - pdns
- pdns-recursor

24
roles/dns/tasks/main.yml Normal file
View File

@ -0,0 +1,24 @@
---
- name: Enable backports
apt_repository: repo='deb http://httpredir.debian.org/debian jessie-backports main' state=present
- name: Install powerdns
apt: name={{item}} default_release=jessie-backports state=latest
with_items:
# - pdns-server
- pdns-recursor
- name: Configure powerdns
template: src={{item}}.j2 dest=/etc/powerdns/{{item}}
tags: dns
notify: Restart powerdns
with_items:
# - pdns.conf
- recursor.conf
- name: Start the powerdns services
service: name={{item}} state=started enabled=yes
with_items:
# - pdns
- pdns-recursor

View File

@ -0,0 +1,40 @@
#################################
# allow-from If set, only allow these comma separated netmasks to recurse
#
#allow-from=127.0.0.0/8
#################################
# daemon Operate as a daemon
#
daemon=yes
#################################
# dnssec DNSSEC mode: off/process-no-validate (default)/process/log-fail/validate
#
# dnssec=process-no-validate
dnssec=off
#################################
# local-address IP addresses to listen on, separated by spaces or commas. Also accepts ports.
#
local-address=127.0.0.1,{{ batman_ipv4.address }}
#################################
# local-port port to listen on
#
local-port=53
#################################
# quiet Suppress logging of questions and answers
#
quiet=on
#################################
# setgid If set, change group id to this gid for more security
#
setgid=pdns
#################################
# setuid If set, change user id to this uid for more security
#
setuid=pdns

View File

@ -11,6 +11,7 @@
hosts: gw31.regensburg.freifunk.net
roles:
- fastd
- dns
- name: Setup confluence server
hosts: confluence.regensburg.freifunk.net