Defined Type: fail2ban::jail

Defined in:
manifests/jail.pp

Summary

Manage jail configs

Overview

Examples:

fail2ban::jail { 'sshd': ensure => 'present' }

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    Sets if jail should be enabled or disabled



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'manifests/jail.pp', line 9

define fail2ban::jail (
  Enum['present', 'absent'] $ensure = 'present',
) {

  include fail2ban

  $_enabled = $ensure ? {
    'present' => true,
    'absent'  => false,
  }

  fail2ban_jail_config { "${name}/enabled": value => $_enabled, notify => Class['fail2ban::service'] }

}