Install the powerdns db backend when requested only. Add a role that installs the db schema. Configure the db server.

This commit is contained in:
Andrea Dell'Amico 2018-05-08 18:52:04 +02:00
parent 9c17782abe
commit a018f64c49
2 changed files with 9 additions and 1 deletions

View File

@ -5,7 +5,6 @@ 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
@ -15,5 +14,9 @@ powerdns_auth_pkgs:
- pdns-backend-lua
- pdns-backend-remote
- pdns-backend-pipe
powerdns_auth_use_db_backend: True
powerdns_auth_db_backend: pgsql
powerdns_auth_db_pkgs:
- 'pdns-backend-{{ powerdns_auth_db_backend }}'

View File

@ -10,6 +10,11 @@
apt: pkg={{ item }} state=present
with_items: '{{ powerdns_auth_pkgs }}'
- name: Install the powerdns DB backend packages
apt: pkg={{ item }} state=present
with_items: '{{ powerdns_auth_db_pkgs }}'
when: powerdns_auth_use_db_backend
- name: Ensure that powerdns is running and enabled
service: name=pdns state=started enabled=yes