Puppet Class: mtail

Defined in:
puppet/modules/mtail/manifests/init.pp

Overview

Parameters:

  • logs (Any) (defaults to: ['/var/log/syslog'])
  • port (Any) (defaults to: '3903')
  • ensure (Any) (defaults to: 'running')
  • group (Any) (defaults to: 'root')


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'puppet/modules/mtail/manifests/init.pp', line 16

class mtail (
  $logs = ['/var/log/syslog'],
  $port = '3903',
  $ensure = 'running',
  $group = 'root',
) {
    apt::pin { 'mtail':
        package  => 'mtail',
        pin      => 'release a=stretch-backports',
        priority => 1001,
    }

    package { 'mtail':
        ensure  => 'present',
        require => Apt::Pin['mtail'],
    }

    file { '/etc/default/mtail':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        content => template('mtail/default.erb'),
        notify  => Service['mtail'],
    }

    systemd::service { 'mtail':
        ensure         => present,
        template_name  => 'mtail',
        service_params => {
            ensure => $ensure,
        },
    }
}