---
- name: install nsd (dnf)
  dnf: name={{ item }} state=present
  with_items:
  - nsd
  - openssl
  notify:
  - restart nsd
  tags:
  - packages
  - nsd

- name: setup ssh keys, etc
  command: nsd-control-setup creates=/etc/nsd/nsd_server.pem
  tags:
  - nsd

- name: make nsd enabled on start
  service: name=nsd enabled=yes
  tags:
  - nsd

- name: install nsd zones file
  template: src=zones.conf.j2 dest=/etc/nsd/conf.d/zones.conf
  notify:
  - restart nsd
  tags:
  - packages
  - nsd
