ansible-roles/powerdns-authoritative/tasks/main.yml

22 lines
679 B
YAML

---
- 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: 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
tags: [ 'dns', 'powerdns' ]