robertdebock / ansible-role-fail2ban

Install and configure fail2ban on your system.
https://robertdebock.nl/
Apache License 2.0
62 stars 29 forks source link

Custom configuration in .local file instead of jail.conf #4

Closed rohankrishnadev closed 4 years ago

rohankrishnadev commented 4 years ago

Is your feature request related to a problem? Please describe. This role modifies the jail.conf file for customisation. This file gets overwritten with every update.

Describe the solution you'd like According to fail2ban the recommended approach would be to provide customisations in jail.local or jail.d/customisation.local file. Switching jail.conf to jail.local in main.yml should do the trick.

Describe alternatives you've considered It might be worth considering putting in a template customisation.local file with sane defaults which the user can switch with their own. This could be done by playbook pathing. The file name could be provided in a variable, that way the user won't have to modify the role.

Additional context N/A

robertdebock commented 4 years ago

Sorry, I did not see your issue until today. Good suggestion, I'll work on it!

robertdebock commented 4 years ago

Need to test and release. Closing when done, could take an hour or two.

robertdebock commented 4 years ago

That was quicker than expected, the tests were successful and release to galaxy has been done, version 3.0.0.

Thanks @rohankrishnadev for your help!