summaryrefslogtreecommitdiffstats
path: root/modules/fail2ban/manifests
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-02-19 02:36:58 -0500
committerJesse Luehrs <doy@tozt.net>2019-02-19 02:36:58 -0500
commit66bdc0aa2a29678f7628270ca50a1ce8fcd205fb (patch)
treec2cfffdd4f2b2ad3f4d497d3d93c17c2e0d38797 /modules/fail2ban/manifests
parentba115c88c5f93561b6f521d6dc232c7c6d85801b (diff)
downloadpuppet-tozt-66bdc0aa2a29678f7628270ca50a1ce8fcd205fb.tar.gz
puppet-tozt-66bdc0aa2a29678f7628270ca50a1ce8fcd205fb.zip
configure fail2ban separately for each host
since mail isn't going to be running nginx directly
Diffstat (limited to 'modules/fail2ban/manifests')
-rw-r--r--modules/fail2ban/manifests/jail.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/fail2ban/manifests/jail.pp b/modules/fail2ban/manifests/jail.pp
new file mode 100644
index 0000000..4e4ece3
--- /dev/null
+++ b/modules/fail2ban/manifests/jail.pp
@@ -0,0 +1,13 @@
+define fail2ban::jail($source=undef) {
+ include fail2ban
+
+ $_source = $source ? {
+ undef => "puppet:///modules/fail2ban/${name}.conf",
+ default => $source,
+ }
+
+ file { "/etc/fail2ban/jail.d/${name}.conf":
+ source => $_source,
+ require => Package["fail2ban"];
+ }
+}