summaryrefslogtreecommitdiff
path: root/puppet/modules/site_stunnel/manifests/clients.pp
blob: 837665a354416931cfbc7367a6ff12e43eee3cb6 (plain)
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
29
30
31
32
33
define site_stunnel::clients (
  $accept_port,
  $connect_port,
  $connect,
  $cafile,
  $key,
  $cert,
  $client     = true,
  $verify     = '2',
  $pid        = $name,
  $rndfile    = '/var/lib/stunnel4/.rnd',
  $debuglevel = '4' ) {

  stunnel::service { $name:
    accept     => "127.0.0.1:${accept_port}",
    connect    => "${connect}:${connect_port}",
    client     => $client,
    cafile     => $cafile,
    key        => $key,
    cert       => $cert,
    verify     => $verify,
    pid        => "/var/run/stunnel4/${pid}.pid",
    rndfile    => $rndfile,
    debuglevel => $debuglevel,
    require    => [
      Class['Site_config::X509::Key'],
      Class['Site_config::X509::Cert'],
      Class['Site_config::X509::Ca'] ];

  }

  include site_check_mk::agent::stunnel
}