Fixed: Linters error

This commit is contained in:
Stupéflo 2024-05-17 12:28:23 +02:00
parent 2a01f9e57d
commit bcd528f951
Signed by: stupeflo
GPG key ID: 873D883BD359DEE2
4 changed files with 61 additions and 61 deletions

View file

@ -1,27 +1,25 @@
---
- name: "Setup variable for zone {{ zone.domain_name }}"
register:
domain_name: "{{ zone.domain_name }}"
transfer_hosts: "{{ zone.transfer_hosts }}"
zone_config_file: "{{ dns.paths.etc }}/named.conf.{{ domain_name }}"
zone_db_file: "{{ dns.paths.dns.paths.primary_zones }}/db.{{ zone.domain_zone }}"
- vars:
zone_config_file: "{{ dns.patch.etc }}/named.conf.{{ zone.domain_name }}"
zone_db_file: "{{ dns.patch.primary_zones }}/db.{{ zone.domain_name }}.zone"
- name: Updating primary zone db file
file:
src: "file/ns/zone/db.{{ domain_name }}"
dest: "{{ zone_db_file }}"
- name: Updating primary zone db file
ansible.builtin.file:
src: "file/ns/zone/db.{{ zone.domain_name }}"
dest: "{{ zone_db_file }}"
- name: "Creating zone {{ domain_name }}"
template:
src: templates/ns/zone/named.conf.primary-zone.j2
dest: "{{ zone_config_file }}"
- name: "Including zone configuration to global configuration"
blockinfile:
path: "{{ dns.path.etc }}/named.conf.local"
state: present
marker: "// {mark} ANSIBLE MANAGED BLOCK FOR {{ domain_name }} ZONE" # not required. The marker line template. C({mark}) will be replaced with the values C(in marker_begin) (default="BEGIN") and C(marker_end) (default="END"). Using a custom marker without the C({mark}) variable may result in the block being repeatedly inserted on subsequent playbook runs.
block: |
"include \"{{ zone_config_file }}\"";
marker_begin: BEGIN
marker_end: END
- name: "Creating zone {{ domain_name }}"
ansible.builtin.template:
src: templates/ns/zone/named.conf.primary-zone.j2
dest: "{{ zone_config_file }}"
mode: "644"
- name: "Including zone configuration to global configuration"
ansible.builtin.blockinfile:
path: "{{ dns.path.etc }}/named.conf.local"
state: present
marker: "// {mark} ANSIBLE MANAGED BLOCK FOR {{ domain_name }} ZONE"
block: |
"include \"{{ zone_config_file }}\"";
marker_begin: BEGIN
marker_end: END