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
|
- name: deploy config files for bind9
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item.src }}.j2"
|
||||||
dest: "/etc/bind/{{ item }}"
|
dest: "/etc/bind/{{ item.dest }}"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
loop:
|
loop:
|
||||||
- db.intern
|
- src: db.RR
|
||||||
- localzones
|
dest: "db.{{ ansible_domain }}"
|
||||||
notify: restart bind
|
- src: db.RRinv
|
||||||
|
dest: "db.{{ ipaddr_lan_threeoct }}"
|
||||||
- name: deploy config files for bind9 - special case where template destination filename is dynamic
|
- src: localzones
|
||||||
template:
|
dest: localzones
|
||||||
src: db.lan.j2
|
|
||||||
dest: "/etc/bind/db.{{ ipaddr_lan_threeoct }}"
|
|
||||||
mode: 0644
|
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
|
|
||||||
- name: link zone files to writeable directory for DDNS
|
- name: link zone files to writeable directory for DDNS
|
||||||
|
@ -60,7 +57,7 @@
|
||||||
dest: "/var/lib/bind/{{ item }}"
|
dest: "/var/lib/bind/{{ item }}"
|
||||||
state: link
|
state: link
|
||||||
loop:
|
loop:
|
||||||
- db.intern
|
- "db.{{ ansible_domain }}"
|
||||||
- "db.{{ ipaddr_lan_threeoct }}"
|
- "db.{{ ipaddr_lan_threeoct }}"
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ ddns-update-style standard;
|
||||||
|
|
||||||
include "/etc/dhcp/rndc.key";
|
include "/etc/dhcp/rndc.key";
|
||||||
|
|
||||||
zone intern. {
|
zone {{ ansible_domain }}. {
|
||||||
primary 127.0.0.1;
|
primary 127.0.0.1;
|
||||||
key rndc-key;
|
key rndc-key;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@ zone "{{ ipaddr_lan_ptr[:-1] }}" {
|
||||||
allow-update { key rndc-key; };
|
allow-update { key rndc-key; };
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "intern" {
|
zone "{{ ansible_domain }}" {
|
||||||
type master;
|
type master;
|
||||||
notify no;
|
notify no;
|
||||||
file "/etc/bind/db.intern";
|
file "/etc/bind/db.{{ ansible_domain }}";
|
||||||
journal "/var/lib/bind/db.intern.jnl";
|
journal "/var/lib/bind/db.{{ ansible_domain }}.jnl";
|
||||||
allow-update { key rndc-key; };
|
allow-update { key rndc-key; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
immediate: true
|
immediate: true
|
||||||
when: not run_in_installer|default(false)|bool
|
when: not run_in_installer|default(false)|bool
|
||||||
|
|
||||||
- name: add LAN interface to zone intern
|
- name: add LAN interface to internal zone
|
||||||
firewalld:
|
firewalld:
|
||||||
zone: internal
|
zone: internal
|
||||||
interface: "{{ if_lan }}"
|
interface: "{{ if_lan }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue