This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
hermes/ansible/roles/nsd/tasks/main.yml

19 lines
415 B
YAML
Raw Normal View History

2023-03-17 16:57:27 +00:00
- 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' }}"