Initial parts of a powerdns role for the authoritative server

This commit is contained in:
Andrea Dell'Amico 2018-05-07 19:07:21 +02:00
parent 71f2fcd730
commit 9c17782abe
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,19 @@
---
powerdns_auth_major: 4
powerdns_auth_minor: 1
powerdns_auth_version: '{{ powerdns_auth_major }}.{{ powerdns_auth_minor }}'
powerdns_auth_repo_data: 'deb [arch=amd64] http://repo.powerdns.com/ubuntu {{ ansible_distribution_release }}-auth-{{ powerdns_auth_major }}{{ powerdns_auth_minor }} main'
powerdns_auth_repo_key: 'https://repo.powerdns.com/FD380FBB-pub.asc'
powerdns_auth_db_backend: pgsql
powerdns_auth_enable_api: True
powerdns_auth_enable_web_interface: True
powerdns_auth_pkgs:
- pdns-server
- pdns-tools
- pdns-backend-lua
- pdns-backend-remote
- pdns-backend-pipe
- 'pdns-backend-{{ powerdns_auth_db_backend }}'

View File

@ -0,0 +1,16 @@
---
- block:
- name: Get the Powerdns repo key
apt_key: url={{ powerdns_auth_repo_key }} state=present
- name: Define the Powerdns package repository
apt_repository: repo='{{ powerdns_auth_repo_data }}' state=present update_cache=yes
- name: Install the powerdns packages
apt: pkg={{ item }} state=present
with_items: '{{ powerdns_auth_pkgs }}'
- name: Ensure that powerdns is running and enabled
service: name=pdns state=started enabled=yes
tags: [ 'dns', 'powerdns' ]