implement

This commit is contained in:
Pim Kunis 2023-04-09 13:42:30 +02:00
parent 2c87d22fa2
commit 7f8cb29675
17 changed files with 379 additions and 47 deletions

18
roles/nsd/tasks/main.yml Normal file
View file

@ -0,0 +1,18 @@
- name: Install nsd
apt:
name: nsd
- name: Copy nsd.conf
copy:
src: "{{ role_path }}/files/nsd.conf"
dest: /etc/nsd/nsd.conf
register: config
- name: Copy zone directory
copy:
src: "{{ role_path }}/files/zones"
dest: /etc/nsd
register: zones
- name: Enable nsd
systemd:
name: nsd
enabled: true
state: "{{ 'restarted' if config.changed or zones.changed else 'started' }}"