dns: Renamed variables, removed prefix dns_ on not essential variable names

dehydrated
Felix Stupp 5 years ago
parent 4e6df015f5
commit 7e2813928e
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1,9 +1,9 @@
---
dns_user: "bind"
dns_configuration_directory: "/etc/bind"
dns_options_configuration: "{{ dns_configuration_directory }}/named.conf.options"
dns_zones_configuration: "{{ dns_configuration_directory }}/named.conf.local"
dns_zones_directory: "{{ dns_configuration_directory }}/zones"
configuration_directory: "/etc/bind"
options_configuration: "{{ configuration_directory }}/named.conf.options"
zones_configuration: "{{ configuration_directory }}/named.conf.local"
zones_directory: "{{ configuration_directory }}/zones"
dns_zones_configuration_environment_directory: "{{ global_configuration_environment_directory }}/dns-zones"
zones_configuration_environment_directory: "{{ global_configuration_environment_directory }}/dns-zones"

@ -14,13 +14,13 @@
group: "{{ dns_user }}"
mode: "u=rwx,g=rx"
loop:
- "{{ dns_zones_directory }}"
- "{{ dns_zones_configuration_environment_directory }}"
- "{{ zones_directory }}"
- "{{ zones_configuration_environment_directory }}"
- name: Configure bind9 options
template:
src: named.conf.options
dest: "{{ dns_options_configuration }}"
dest: "{{ options_configuration }}"
owner: root
group: "{{ dns_user }}"
mode: "u=rw,g=r,o=r"

@ -2,14 +2,14 @@
# domain: "example.com"
domain_directory: "{{ dns_zones_directory }}/{{ domain }}"
domain_directory: "{{ zones_directory }}/{{ domain }}"
configuration_file: "{{ domain_directory }}/zone.conf"
database_file_name: "zone.db"
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_configuration_environment_directory }}/{{ domain }}"
domain_environment_directory: "{{ zones_configuration_environment_directory }}/{{ domain }}"
domain_environment_link_name: "conf"
domain_environment_link: "{{ domain_environment_directory }}/{{ domain_environment_link_name }}"

@ -63,7 +63,7 @@
- name: Include configuration file of zone {{ domain }}
lineinfile:
path: "{{ dns_zones_configuration }}"
path: "{{ zones_configuration }}"
state: present
line: "include \"{{ configuration_file }}\";"
validate: "named-checkconf %s"

@ -2,5 +2,5 @@
domain: "example.com"
configuration_file: "{{ dns_zones_directory }}/{{ domain }}.conf"
database_file: "{{ dns_zones_directory }}/{{ domain }}.db"
configuration_file: "{{ zones_directory }}/{{ domain }}.conf"
database_file: "{{ zones_directory }}/{{ domain }}.db"

@ -12,7 +12,7 @@
- name: Include configuration file of zone {{ domain }}
lineinfile:
path: "{{ dns_zones_configuration }}"
path: "{{ zones_configuration }}"
state: present
line: "include \"{{ configuration_file }}\";"
validate: "named-checkconf %s"

Loading…
Cancel
Save