10 file { '/etc/fail2ban/jail.d/dsa-00-default.conf':
11 source => 'puppet:///modules/fail2ban/jail/dsa-00-default.conf',
12 notify => Service['fail2ban'],
17 @hook post "type fail2ban-client > /dev/null && (fail2ban-client ping > /dev/null && fail2ban-client reload > /dev/null ) || true";
18 @hook flush "type fail2ban-client > /dev/null && (fail2ban-client ping > /dev/null && fail2ban-client reload > /dev/null ) || true";
22 ferm::rule { 'dsa-f2b-setup1':
24 description => 'f2b master rule',
30 ferm::rule { 'dsa-f2b-setup2':
32 description => 'f2b master rule',
35 rule => 'jump dsa-f2b',
38 # XXX Maybe this will be automatically done in buster, it is certainly needed in stretch. So maybe: versioncmp($::lsbmajdistrelease, '9') <= 0
39 concat::fragment { 'puppet-crontab--fail2ban-cleanup':
40 target => '/etc/cron.d/puppet-crontab',
42 17 * * * * root chronic python3 -c "import sys, logging; logging.basicConfig(stream=sys.stdout, level=logging.INFO); from fail2ban.server.database import Fail2BanDb; db = Fail2BanDb('/var/lib/fail2ban/fail2ban.sqlite3'); db.purge(); db._db.cursor().execute('VACUUM')"