diff --git a/roles/dns/master/defaults/main.yml b/roles/dns/master/defaults/main.yml index af9d841..9379ce2 100644 --- a/roles/dns/master/defaults/main.yml +++ b/roles/dns/master/defaults/main.yml @@ -9,6 +9,10 @@ database_file: "{{ domain_directory }}/{{ database_file_name }}" database_signed_file_name: "{{ database_file_name }}.signed" database_signed_file: "{{ domain_directory }}/{{ database_signed_file_name }}" +domain_environment_directory: "{{ dns_zones_environment_directory }}/{{ domain }}" +domain_environment_link_name: "conf" +domain_environment_link: "{{ domain_environment_directory }}/{{ domain_environment_link_name }}" + dnssec_algorithm: "RSASHA512" dnssec_key_length: "4096" diff --git a/roles/dns/master/tasks/main.yml b/roles/dns/master/tasks/main.yml index 43b55d1..d9dad36 100644 --- a/roles/dns/master/tasks/main.yml +++ b/roles/dns/master/tasks/main.yml @@ -11,6 +11,20 @@ - "{{ domain_directory }}" - "{{ domain_environment_directory }}" +- name: Upload makefile to domain zone configuration environment + template: + src: zone.makefile + dest: "{{ domain_environment_directory }}/makefile" + owner: root + group: root + mode: "u=rw,g=r,o=r" + +- name: Create link in domain zone configuration environment + file: + state: link + src: "{{ domain_directory }}" + dest: "{{ domain_environment_link }}" + - name: Determine if keys are generated already find: paths: "{{ domain_directory }}" diff --git a/roles/dns/master/templates/zone.makefile b/roles/dns/master/templates/zone.makefile new file mode 100644 index 0000000..010e269 --- /dev/null +++ b/roles/dns/master/templates/zone.makefile @@ -0,0 +1 @@ +dest:={{ domain_environment_link_name }}