From 8ce6fe0da58167f600ff4aaefa6181d282aabbfe Mon Sep 17 00:00:00 2001 From: Joerg Kastning Date: Mon, 10 Feb 2025 16:25:21 +0100 Subject: [PATCH] Changed ansible_db_template to ansible_config_template As the template is for the aide.conf(5) file I found that the variable name 'ansible_config_template' is a better fit than 'ansible_db_template'. Signed-off-by: Joerg Kastning --- README.md | 2 +- defaults/main.yml | 2 +- examples/custom-template.yml | 2 +- tasks/main.yml | 4 ++-- tests/tests_custom_template.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 14876bb..3276c5d 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ only. ## Role Variables -### aide_db_template +### aide_config_template This variable takes a string to specify a path where the custom template for aide.conf is located. diff --git a/defaults/main.yml b/defaults/main.yml index d2e909d..1729119 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,7 +4,7 @@ # This file also serves as a documentation for such a variables. # Path to template file -aide_db_template: null +aide_config_template: null # Examples of role input variables: aide_db_fetch_dir: files diff --git a/examples/custom-template.yml b/examples/custom-template.yml index 318b551..7967a11 100644 --- a/examples/custom-template.yml +++ b/examples/custom-template.yml @@ -5,7 +5,7 @@ tasks: - name: Include role aide vars: - aide_db_template: /tmp/aide-custom.conf.j2 + aide_config_template: /tmp/aide-custom.conf.j2 aide_db_fetch_dir: files aide_init: true aide_fetch_db: true diff --git a/tasks/main.yml b/tasks/main.yml index bcdede9..f0be4cf 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,10 +20,10 @@ - name: Generate "/etc/{{ __aide_config }}" ansible.builtin.template: - src: "{{ aide_db_template }}" + src: "{{ aide_config_template }}" dest: "/etc/{{ __aide_config }}" mode: "0400" - when: aide_db_template is not none + when: aide_config_template is not none # - name: Print Header # ansible.builtin.command: head /etc/aide.conf || true diff --git a/tests/tests_custom_template.yml b/tests/tests_custom_template.yml index 630be87..f16222a 100644 --- a/tests/tests_custom_template.yml +++ b/tests/tests_custom_template.yml @@ -5,7 +5,7 @@ roles: - role: linux-system-roles.aide vars: - aide_db_template: files/aide-custom.conf.j2 + aide_config_template: files/aide-custom.conf.j2 aide_install: true aide_init: true tasks: