diff --git a/roles/role_deploy_internal_named/tasks/main.yml b/roles/role_deploy_internal_named/tasks/main.yml index 9104edc..0763210 100644 --- a/roles/role_deploy_internal_named/tasks/main.yml +++ b/roles/role_deploy_internal_named/tasks/main.yml @@ -27,6 +27,8 @@ ansible.builtin.template: src: "{{ item }}.j2" dest: "/mnt/volumes/etc_internal_named/data/{{ item }}" + seuser: system_u + serole: object_r setype: container_file_t become: true with_items: diff --git a/roles/role_deploy_internal_named/templates/named.conf.local.j2 b/roles/role_deploy_internal_named/templates/named.conf.local.j2 index 523bacb..c482770 100644 --- a/roles/role_deploy_internal_named/templates/named.conf.local.j2 +++ b/roles/role_deploy_internal_named/templates/named.conf.local.j2 @@ -7,13 +7,23 @@ include "/etc/bind/zones.rfc1918"; zone "scimetis.net" IN { - type master; - file "named.scimetis.net"; + type secondary; + // the file statement here allows the secondary to save + // each zone transfer so that in the event of a program restart + // the zone can be loaded immediately and the server can start + // to respond to queries without waiting for a zone transfer + file "named.scimetis.net.cached"; allow-update { none; }; + primaries { 192.168.1.3; }; }; zone "1.168.192.in-addr.arpa" IN { - type master; - file "named.1.168.192.in-addr.arpa"; + type secondary; + // the file statement here allows the secondary to save + // each zone transfer so that in the event of a program restart + // the zone can be loaded immediately and the server can start + // to respond to queries without waiting for a zone transfer + file "named.1.168.192.in-addr.arpa.cached"; allow-update { none; }; + primaries { 192.168.1.3; }; };