Puppet Class: role::ipsec

Defined in:
modules/role/manifests/ipsec.pp

Overview

Parameters:

  • hosts (Any) (defaults to: undef)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'modules/role/manifests/ipsec.pp', line 1

class role::ipsec ($hosts = undef) {
    $puppet_certname = $::fqdn

    # Host IPsec/strongswan alerts are now aggregated into an "Aggregate IPsec Tunnel Status" check which is driven by prometheus
    include profile::prometheus::ipsec_exporter

    file { '/usr/local/lib/nagios/plugins/check_strongswan':
        ensure => absent,
    }

    if $hosts != undef {
        $targets = $hosts
    }

    class { '::strongswan':
        puppet_certname => $puppet_certname,
        hosts           => $targets.filter |$target| { $target != '' },
    }
}