Skip to content

Conversation

FinweVI
Copy link

@FinweVI FinweVI commented Jun 15, 2025

No description provided.


- name: Copy fail2ban custom configuration file into place.
template:
src: fail2ban.local.j2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line src: fail2ban.local.j2 needs to removed. Then it should work.

security_fail2ban_enabled: true
security_fail2ban_custom_configuration_template: "jail.local.j2"
security_fail2ban_custom_jail_template: "jail.local.j2"
security_fail2ban_custom_configuration_template: "fail2ban.local.j2"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the variable name security_fail2ban_custom_configuration_template seems to be good for fail2ban.local. Nevertheless, for backward compatibility it would be better to keep it for the jail.local and create a new variable for the fail2ban.local config.

Proposal:

security_fail2ban_custom_fail2ban_local_template: "fail2ban.local.j2"
security_fail2ban_custom_configuration_template: "jail.local.j2"

In this case only the line

src: fail2ban.local.j2

needs to be changed to

src: "{{ security_fail2ban_custom_fail2ban_local_template }}"

in file tasks/fail2ban.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants