From 806bfb26907e9bb3d41f0c9225800a7f8c77683a Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Tue, 2 Apr 2019 20:23:52 +0200 Subject: space_server: named: support dynamic updates ..of the dhcp zone and reverse dns for 10.42.0.0/16 This way the dhcp daemon can add entries when it handles out leases. --- roles/space_server/tasks/named.yml | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'roles/space_server/tasks') diff --git a/roles/space_server/tasks/named.yml b/roles/space_server/tasks/named.yml index 243bf3e..519b5d4 100644 --- a/roles/space_server/tasks/named.yml +++ b/roles/space_server/tasks/named.yml @@ -1,21 +1,40 @@ --- -- name: Create local zones +- name: Create s zone template: - dest: '/etc/named/{{ item }}' - src: '{{ item }}.j2' + dest: '/etc/named/s.zone' + src: s.zone.j2 owner: root group: named mode: 0644 - with_items: - - 's.zone' - - 'ipv4.rev.zone' + notify: + - restart named + +- name: Create dhcp zone + template: + dest: '/var/named/dynamic/dhcp.zone' + src: dhcp.zone.j2 + owner: named + group: named + mode: 0644 + force: no + notify: + - restart named + +- name: Create ipv4 reverse dns zone + template: + dest: '/var/named/dynamic/ipv4.rev.zone' + src: ipv4.rev.zone.j2 + owner: named + group: named + mode: 0644 + force: no notify: - restart named - name: Configure named - copy: + template: dest: '/etc/named.conf' - src: named.conf + src: named.conf.j2 owner: root group: named mode: 0640 -- cgit v1.2.1