X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Ffail2ban%2Fmanifests%2Finit.pp;h=b85b0091d30556154f1c68b0c0b5bfcea7fcac42;hb=d6c2e9deaaeb0676521a0fbe0b23b875329b3b85;hp=f4f7b9fd08d2f7c9bb64a8645e3d53c0eee961ba;hpb=95d495556e7a09f75c031aa431add52394a36dfd;p=mirror%2Fdsa-puppet.git diff --git a/modules/fail2ban/manifests/init.pp b/modules/fail2ban/manifests/init.pp index f4f7b9fd0..b85b0091d 100644 --- a/modules/fail2ban/manifests/init.pp +++ b/modules/fail2ban/manifests/init.pp @@ -1,3 +1,7 @@ +# fail2ban setup +# +# Checks that are only used on particular systems are defined elsewhere, +# generally in subclasses. class fail2ban { package { 'fail2ban': ensure => installed, @@ -9,7 +13,7 @@ class fail2ban { file { '/etc/fail2ban/jail.d/dsa-00-default.conf': source => 'puppet:///modules/fail2ban/jail/dsa-00-default.conf', - notify => Service['fail2ban'], + notify => Service['fail2ban'], } ferm::conf { 'f2b': @@ -37,8 +41,8 @@ class fail2ban { # XXX Maybe this will be automatically done in buster, it is certainly needed in stretch. So maybe: versioncmp($::lsbmajdistrelease, '9') <= 0 concat::fragment { 'puppet-crontab--fail2ban-cleanup': - target => '/etc/cron.d/puppet-crontab', - content => @(EOF) + target => '/etc/cron.d/puppet-crontab', + content => @(EOF) 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')" | EOF }