Fix bind configuration.
This commit is contained in:
parent
b0e34434b1
commit
a5e143b900
6 changed files with 14 additions and 17 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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; };
|
||||
};
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
Loading…
Add table
Reference in a new issue