Molecule lint
This commit is contained in:
@@ -28,4 +28,10 @@ bind9_default_config:
|
||||
options:
|
||||
directory: "{{ bind9_working_directory }}"
|
||||
|
||||
bind9_config: "{{ [bind9_default_config, bind9_group_config, bind9_leaf_config, bind9_host_config] | community.general.lists_mergeby('name', recursive=true, list_merge='append_rp') }}"
|
||||
bind9_config: "{{ [bind9_default_config,
|
||||
bind9_group_config,
|
||||
bind9_leaf_config,
|
||||
bind9_host_config] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='append_rp') }}"
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
---
|
||||
# handlers file for bind9
|
||||
- name: reload bind
|
||||
- name: Reload bind
|
||||
ansible.builtin.service:
|
||||
name: named
|
||||
state: reloaded
|
||||
|
||||
- name: restart bind
|
||||
- name: Restart bind
|
||||
ansible.builtin.service:
|
||||
name: named
|
||||
state: restarted
|
||||
|
||||
- name: backup bind config
|
||||
- name: Backup bind config
|
||||
community.general.archive:
|
||||
path:
|
||||
- "{{ bind9_cfgdir }}"
|
||||
- "{{ bind9_working_directory }}"
|
||||
- "{{ bind9_libdir }}"
|
||||
dest: "{{ bind9_backup_dir }}/bind9-config-{{ ansible_date_time.iso8601_basic_short }}.tar.gz"
|
||||
dest: >
|
||||
{{ bind9_backup_dir }}/
|
||||
bind9-config-
|
||||
{{ ansible_date_time.iso8601_basic_short }}.tar.gz
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0640
|
||||
when: bind9_backup_config is defined and bind9_backup_config
|
||||
when: bind9_backup_config is defined and bind9_backup_config
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
galaxy_info:
|
||||
role_name: bind9
|
||||
namespace: keepit
|
||||
@@ -10,18 +11,18 @@ galaxy_info:
|
||||
|
||||
license: GPL-3.0-or-later
|
||||
|
||||
min_ansible_version: 2.13
|
||||
min_ansible_version: "2.13"
|
||||
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- 22.04
|
||||
- 20.04
|
||||
- jammy
|
||||
- focal
|
||||
- name: Debian
|
||||
versions:
|
||||
- 11
|
||||
- bullseye
|
||||
|
||||
galaxy_tags:
|
||||
galaxy_tags:
|
||||
- bind9
|
||||
- bind
|
||||
- dns
|
||||
|
||||
@@ -16,3 +16,7 @@ provisioner:
|
||||
name: ansible-lint
|
||||
verifier:
|
||||
name: ansible
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint .
|
||||
|
||||
@@ -18,12 +18,13 @@
|
||||
mode: 0750
|
||||
when: bind9_backup_config is defined and bind9_backup_config
|
||||
|
||||
- name: named.conf.generator
|
||||
- name: Template named.conf.generator
|
||||
ansible.builtin.template:
|
||||
src: named.conf.generator.j2
|
||||
dest: "{{ bind9_cfgdir }}/{{ item.name }}"
|
||||
owner: root
|
||||
group: bind
|
||||
mode: 0640
|
||||
backup: "{{ item.backup | default('false') | bool }}"
|
||||
# validate: 'named-checkconf -z -j %s'
|
||||
loop: "{{ bind9_config }}"
|
||||
@@ -33,8 +34,8 @@
|
||||
- bind9
|
||||
- template
|
||||
notify:
|
||||
- backup bind config
|
||||
- restart bind
|
||||
- Backup bind config
|
||||
- Restart bind
|
||||
|
||||
- name: Ensure the named service is started
|
||||
ansible.builtin.service:
|
||||
|
||||
Reference in New Issue
Block a user