Puppet Class: stunnel

Defined in:
manifests/init.pp

Summary

Basic Stunnel config. Installs the packages and creates essential directories.

Overview

Examples:

Basic usage

include stunnel

Parameters:

  • bin_name (Optional[String]) (defaults to: undef)

    Name of the stunnel executable.

  • bin_path (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Path to the directory containing the stunnel executable.

  • cert_dir (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Path to the directory containing the certificates.

  • config_dir (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Path to the directory containing the configuration files.

  • log_dir (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Path to the directory containing the output files.

  • packages (Optional[Array]) (defaults to: undef)

    List of packages to install.

  • packages_ensure (Optional[Enum[ 'present', 'latest' ]]) (defaults to: undef)

    If packages should be updated or not.

  • packages_provider (Optional[String]) (defaults to: undef)

    Provider to use to install the packages. Mandatory on Windows.

  • pid_dir (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Path to the directory containing the pid file. Linux only.

  • user (Optional[String]) (defaults to: undef)

    User that will own the files and run the service.

  • group (Optional[String]) (defaults to: undef)

    Group that will own the files and run the service.

Author:

  • Aaron Russo Stephen Hoekstra Philippe Ganz

Since:

  • 0.0.0



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'manifests/init.pp', line 52

class stunnel (
  Optional[String]               $bin_name            = undef,
  Optional[Stdlib::Absolutepath] $bin_path            = undef,
  Optional[Stdlib::Absolutepath] $cert_dir            = undef,
  Optional[Stdlib::Absolutepath] $config_dir          = undef,
  Optional[Stdlib::Absolutepath] $log_dir             = undef,
  Optional[Array]                $packages            = undef,
  Optional[Enum[
      'present',
      'latest'
  ]]                             $packages_ensure     = undef,
  Optional[String]               $packages_provider   = undef,
  Optional[Stdlib::Absolutepath] $pid_dir             = undef,
  Optional[String]               $user                = undef,
  Optional[String]               $group               = undef,
) {
  package { $packages:
    ensure   => $packages_ensure,
    provider => $packages_provider,
  }

  $stunnel_dirs = [
    $cert_dir,
    $config_dir,
    $log_dir,
  ]

  file { $stunnel_dirs:
    ensure => directory,
    owner  => $user,
    group  => $group,
    mode   => '0775',
  }
}