fix: standardize YAML formatting and improve readability in bind9 configuration files
This commit is contained in:
@@ -16,7 +16,6 @@ bind9_config_indent: 4
|
||||
bind9_group_config: []
|
||||
bind9_site_config: []
|
||||
bind9_host_config: []
|
||||
|
||||
bind9_default_config:
|
||||
- name: named.conf
|
||||
backup: false
|
||||
@@ -28,10 +27,5 @@ bind9_default_config:
|
||||
options:
|
||||
directory: "{{ bind9_working_directory }}"
|
||||
|
||||
bind9_config: "{{ [bind9_default_config,
|
||||
bind9_group_config,
|
||||
bind9_site_config,
|
||||
bind9_host_config] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='append_rp') }}"
|
||||
bind9_config: "{{ [bind9_default_config, bind9_group_config, bind9_site_config, bind9_host_config] | community.general.lists_mergeby('name', recursive=true, list_merge='append_rp')
|
||||
}}"
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
- "{{ bind9_cfgdir }}"
|
||||
- "{{ bind9_working_directory }}"
|
||||
- "{{ bind9_libdir }}"
|
||||
dest: "{{
|
||||
bind9_backup_dir + '/bind9-config-' +
|
||||
ansible_facts.date_time.iso8601_basic_short + '.tar.gz' }}"
|
||||
dest: "{{ bind9_backup_dir + '/bind9-config-' + ansible_facts.date_time.iso8601_basic_short + '.tar.gz' }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0640'
|
||||
mode: "0640"
|
||||
when: bind9_backup_config is defined and bind9_backup_config
|
||||
|
||||
@@ -7,8 +7,7 @@ argument_specs:
|
||||
type: list
|
||||
elements: dict
|
||||
description:
|
||||
- A list of configuration dictionaries that are merged to
|
||||
produce the final configuration.
|
||||
- A list of configuration dictionaries that are merged to produce the final configuration.
|
||||
- Each element must have a 'name' key (filename).
|
||||
bind9_default_config:
|
||||
type: list
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0750'
|
||||
mode: "0750"
|
||||
when: bind9_backup_config is defined and bind9_backup_config | bool
|
||||
|
||||
- name: Deploy and Validate Configuration
|
||||
@@ -33,9 +33,9 @@
|
||||
remote_src: true
|
||||
owner: root
|
||||
group: bind
|
||||
mode: '0640'
|
||||
mode: "0640"
|
||||
changed_when: false
|
||||
failed_when: false # It's okay if the file doesn't exist yet
|
||||
failed_when: false # It's okay if the file doesn't exist yet
|
||||
loop: "{{ bind9_config }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
@@ -46,7 +46,7 @@
|
||||
dest: "{{ bind9_cfgdir }}/{{ item.name }}"
|
||||
owner: root
|
||||
group: bind
|
||||
mode: '0640'
|
||||
mode: "0640"
|
||||
loop: "{{ bind9_config }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
@@ -65,7 +65,7 @@
|
||||
remote_src: true
|
||||
owner: root
|
||||
group: bind
|
||||
mode: '0640'
|
||||
mode: "0640"
|
||||
loop: "{{ bind9_config }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
Reference in New Issue
Block a user