Puppet Class: tripleo::stunnel

Defined in:
manifests/stunnel.pp

Overview

Class: tripleo::stunnel

Installs and starts stunnel

manage_service

(Optional) Whether we’ll be managing the stunnel service or not. Defaults to true

service_ensure

(Optional) Ensure the service be running or stopped Defaults to ‘running’

foreground

(Optional) Sets the configuration for stunnel to run the process in the foreground. This is useful when trying to run stunnel in a container. Defaults to ‘no’

debug

(Optional) Sets the debug level in stunnel.conf Defaults to ‘4’ which translates to ‘warning’.

Parameters:

  • manage_service (Any) (defaults to: true)
  • service_ensure (Any) (defaults to: 'running')
  • foreground (Any) (defaults to: 'no')
  • debug (Any) (defaults to: 'warning')


38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'manifests/stunnel.pp', line 38

class tripleo::stunnel (
  $manage_service = true,
  $service_ensure = 'running',
  $foreground     = 'no',
  $debug          = 'warning',
){
  package { 'stunnel':
    ensure => 'present'
  }

  concat { '/etc/stunnel/stunnel.conf':
    ensure => present,
  }
  concat::fragment { 'stunnel-foreground':
    target  => '/etc/stunnel/stunnel.conf',
    order   => '10-foreground-config',
    content => template('tripleo/stunnel/foreground.erb'),
  }
  if $manage_service {
    Concat['/etc/stunnel/stunnel.conf'] ~> Service['stunnel']

    include tripleo::stunnel::systemd_unit

    service { 'stunnel':
      ensure => $service_ensure
    }
  }
}