Skip to content

Commit

Permalink
Changed ansible_db_template to ansible_config_template
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Tronde authored and richm committed Feb 10, 2025
1 parent 3bca54f commit 8ce6fe0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_custom_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8ce6fe0

Please sign in to comment.