Puppet Class: mailhog::install

Defined in:
manifests/install.pp

Overview

Class to install mailhog.

Dont include this class directly.



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
# File 'manifests/install.pp', line 5

class mailhog::install {
  case $::mailhog::install_method {
    'package': {
      package { $::mailhog::package_name:
        ensure => $::mailhog::package_version,
      }
    }
    'wget': {
      file { $::mailhog::install_dir:
        ensure => directory,
      } ->
      wget::fetch { '/usr/bin/mailhog':
        source      => $::mailhog::wget_source,
        destination => "${::mailhog::install_dir}/mailhog",
        timeout     => 0,
        verbose     => false,
      } ->
      file { "${::mailhog::install_dir}/mailhog":
        group => 'root',
        mode  => '0755',
        owner => 'root',
      }
    }
    default: {
      fail("Installation method ${::mailhog::install_method} not supported")
    }
  }
}