Defined Type: fifo_log_demux::instance

Defined in:
modules/fifo_log_demux/manifests/instance.pp

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: present)
  • user (String) (defaults to: 'root')
  • fifo (Stdlib::Absolutepath) (defaults to: '/var/run/fifo.pipe')
  • socket (Stdlib::Absolutepath) (defaults to: '/var/run/log.socket')
  • wanted_by (Optional[String]) (defaults to: undef)
  • required_by (Optional[String]) (defaults to: undef)
  • create_fifo (Boolean) (defaults to: false)
  • fifo_owner (Optional[String]) (defaults to: undef)
  • fifo_group (Optional[String]) (defaults to: undef)
  • fifo_mode (Optional[Stdlib::Filemode]) (defaults to: undef)


1
2
3
4
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
33
34
35
# File 'modules/fifo_log_demux/manifests/instance.pp', line 1

define fifo_log_demux::instance(
    Wmflib::Ensure $ensure = present,
    String $user = 'root',
    Stdlib::Absolutepath $fifo = '/var/run/fifo.pipe',
    Stdlib::Absolutepath $socket = '/var/run/log.socket',
    Optional[String] $wanted_by = undef,
    Optional[String] $required_by = undef,
    Boolean $create_fifo = false,
    Optional[String] $fifo_owner = undef,
    Optional[String] $fifo_group = undef,
    Optional[Stdlib::Filemode] $fifo_mode = undef,
) {
    include fifo_log_demux

    if $create_fifo {
        exec { "create_fifo@${title}":
            command => "/usr/bin/mkfifo ${fifo}",
            creates => $fifo,
        }

        file { $fifo:
            ensure  => $ensure,
            owner   => $fifo_owner,
            group   => $fifo_group,
            mode    => $fifo_mode,
            require => Exec["create_fifo@${title}"],
        }
    }

    systemd::service { "fifo-log-demux@${title}":
        ensure  => $ensure,
        restart => true,
        content => systemd_template('fifo-log-demux@'),
    }
}