Puppet Class: librenms::applications::fail2ban

Inherits:
librenms::params
Defined in:
manifests/applications/fail2ban.pp

Overview

Parameters:

  • enabled (Boolean) (defaults to: true)
  • cache (Boolean) (defaults to: true)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'manifests/applications/fail2ban.pp', line 1

class librenms::applications::fail2ban (
  Boolean $enabled = true,
  Boolean $cache = true,
) inherits librenms::params {

    if $enabled {
        $file_existance = 'present'
    } else {
        $file_existance = 'absent'
    }

    if $cache {
      $script_args = '-c -U'
    } else {
      $script_args = ''
    }

    create_resources(librenms::fetch, {
            'fail2ban' => {
            use => $enabled,
    }})

    librenms::snmpd{'fail2ban':
        use         => $enabled,
        script      => 'fail2ban',
        script_args => ''
    }
}