Puppet Class: mailhog

Defined in:
manifests/init.pp

Overview

Class to install and configure mailhog.

Use this module to install and configure mailhog.

Examples:

Declaring the class

class { '::mailhog':
  install_method => 'archive',
  archive_source => 'https://github.com/mailhog/MailHog/releases/download/v1.0.1/MailHog_linux_amd64',
}

Parameters:

  • config (String[1])

    Mailhog config.

  • config_file (Stdlib::Absolutepath)

    Mailhog config file.

  • install_dir (Stdlib::Absolutepath)

    Location of mailhog binary release.

  • install_method (Enum['package','archive'])

    How to install mailhog.

  • manage_service (Boolean)

    Manage the mailhog service.

  • package_name (String[1])

    Name of package to install.

  • package_version (String[1])

    Version of mailhog to install.

  • service_name (String[1])

    Name of service to manage.

  • service_provider (String[1])

    Init system that is used.

  • service_ensure (Enum['running','stopped'])

    The state of the service.

  • archive_source (Optional[Stdlib::HTTPUrl]) (defaults to: undef)

    Location of mailhog binary release.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/init.pp', line 22

class mailhog (
  String[1] $config ,
  Stdlib::Absolutepath $config_file ,
  Stdlib::Absolutepath $install_dir ,
  Enum['package','archive'] $install_method,
  Boolean $manage_service,
  String[1] $package_name,
  String[1] $package_version,
  String[1] $service_name,
  String[1] $service_provider,
  Enum['running','stopped'] $service_ensure,
  Optional[Stdlib::HTTPUrl] $archive_source = undef,
) {
  contain 'mailhog::install'
  contain 'mailhog::config'
  contain 'mailhog::service'

  Class['mailhog::install']
  -> Class['mailhog::config']
  ~> Class['mailhog::service']
}