19 lines
415 B
YAML
19 lines
415 B
YAML
|
- 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' }}"
|