diff --git a/roles/dnsdhcptftp/tasks/main.yml b/roles/dnsdhcptftp/tasks/main.yml index 623741f..8eb02e3 100644 --- a/roles/dnsdhcptftp/tasks/main.yml +++ b/roles/dnsdhcptftp/tasks/main.yml @@ -39,19 +39,16 @@ - name: deploy config files for bind9 template: - src: "{{ item }}.j2" - dest: "/etc/bind/{{ item }}" + src: "{{ item.src }}.j2" + dest: "/etc/bind/{{ item.dest }}" mode: 0644 loop: - - db.intern - - localzones - notify: restart bind - -- name: deploy config files for bind9 - special case where template destination filename is dynamic - template: - src: db.lan.j2 - dest: "/etc/bind/db.{{ ipaddr_lan_threeoct }}" - mode: 0644 + - src: db.RR + dest: "db.{{ ansible_domain }}" + - src: db.RRinv + dest: "db.{{ ipaddr_lan_threeoct }}" + - src: localzones + dest: localzones notify: restart bind - name: link zone files to writeable directory for DDNS @@ -60,7 +57,7 @@ dest: "/var/lib/bind/{{ item }}" state: link loop: - - db.intern + - "db.{{ ansible_domain }}" - "db.{{ ipaddr_lan_threeoct }}" notify: restart bind diff --git a/roles/dnsdhcptftp/templates/db.intern.j2 b/roles/dnsdhcptftp/templates/db.RR.j2 similarity index 100% rename from roles/dnsdhcptftp/templates/db.intern.j2 rename to roles/dnsdhcptftp/templates/db.RR.j2 diff --git a/roles/dnsdhcptftp/templates/db.lan.j2 b/roles/dnsdhcptftp/templates/db.RRinv.j2 similarity index 100% rename from roles/dnsdhcptftp/templates/db.lan.j2 rename to roles/dnsdhcptftp/templates/db.RRinv.j2 diff --git a/roles/dnsdhcptftp/templates/dhcpd.conf.j2 b/roles/dnsdhcptftp/templates/dhcpd.conf.j2 index 9bb803c..1096ab3 100644 --- a/roles/dnsdhcptftp/templates/dhcpd.conf.j2 +++ b/roles/dnsdhcptftp/templates/dhcpd.conf.j2 @@ -21,7 +21,7 @@ ddns-update-style standard; include "/etc/dhcp/rndc.key"; -zone intern. { +zone {{ ansible_domain }}. { primary 127.0.0.1; key rndc-key; } diff --git a/roles/dnsdhcptftp/templates/localzones.j2 b/roles/dnsdhcptftp/templates/localzones.j2 index 7cd8cb9..e71d0a7 100644 --- a/roles/dnsdhcptftp/templates/localzones.j2 +++ b/roles/dnsdhcptftp/templates/localzones.j2 @@ -8,10 +8,10 @@ zone "{{ ipaddr_lan_ptr[:-1] }}" { allow-update { key rndc-key; }; }; -zone "intern" { +zone "{{ ansible_domain }}" { type master; notify no; - file "/etc/bind/db.intern"; - journal "/var/lib/bind/db.intern.jnl"; + file "/etc/bind/db.{{ ansible_domain }}"; + journal "/var/lib/bind/db.{{ ansible_domain }}.jnl"; allow-update { key rndc-key; }; }; diff --git a/roles/firewalld2if/tasks/main.yml b/roles/firewalld2if/tasks/main.yml index c21b90c..3147677 100644 --- a/roles/firewalld2if/tasks/main.yml +++ b/roles/firewalld2if/tasks/main.yml @@ -33,7 +33,7 @@ immediate: true when: not run_in_installer|default(false)|bool -- name: add LAN interface to zone intern +- name: add LAN interface to internal zone firewalld: zone: internal interface: "{{ if_lan }}"