Moved main configuration from fail2ban.conf to fail2ban.local

Fail2ban's documentation suggests that modifications to the main configuration be
done in a .local file instead of modificating the main fail2ban.conf file.

If upgrading from a previous version of the module, you will probably end up with both
files having the same content. This is pretty harmless, but can be confusing at first.
Changes to the fail2ban.local file will have precedence over those in fail2ban.conf
so no matter if you previously had a modified fail2ban.conf file, the new values will
be used.

This change modifies the previous behaviour of the module where the main configuration
file was overwritten, but ensures future compatibility with fail2ban.
This commit is contained in:
Javier Bértoli committed 2013-08-07 17:29:19 -03:00
1 parent 4b7f4fd097
commit 3e015d6635
7 files changed
+75 -50

No files matched your search

+5 -3
View File
@@ -89,7 +89,7 @@ For detailed info about the logic and usage patterns of Example42 modules check
* Use custom sources for main config file
class { 'fail2ban':
source => [ "puppet:///modules/example42/fail2ban/fail2ban.conf-${hostname}" , "puppet:///modules/example42/fail2ban/fail2ban.conf" ],
source => [ "puppet:///modules/example42/fail2ban/fail2ban.local-${hostname}" , "puppet:///modules/example42/fail2ban/fail2ban.local" ],
}
@@ -100,10 +100,12 @@ For detailed info about the logic and usage patterns of Example42 modules check
source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir
}
* Use custom template for main config file. Note that template and source arguments are alternative.
* Use custom template for main config file. Note that template and source arguments are alternative.
In this new version, and following fail2ban recommendations, fail2ban.conf is untouched and
fail2ban.local is created instead, overriding parameters.
class { 'fail2ban':
template => 'example42/fail2ban/fail2ban.conf.erb',
template => 'example42/fail2ban/fail2ban.local.erb',
}
* Automatically include a custom subclass