Defined Type: syslogng::destination

Defined in:
manifests/destination.pp

Overview

Define: syslogng::destination

Create a default file based syslog-ng destination.

This define is used to create parts of the default non parameterized setup.

Parameters

ensure

Create or remove a destination, may be present or absent. Default: present

conf_dir

configuration parent dir. Default: /etc/syslog-ng

type

Type of destination to create must be file.

Remaining parameters are not used by this module but are replicated here to support an api that is designed looking ahead at the nice filter features in puppet 3.2.

Parameters:

  • ensure (Any) (defaults to: present)
  • conf_dir (Any) (defaults to: '/etc/syslog-ng')
  • type (Any) (defaults to: file)
  • logpaths (Any) (defaults to: undef)
  • priority (Any) (defaults to: undef)
  • transport (Any) (defaults to: undef)
  • port (Any) (defaults to: undef)
  • no_multi_line (Any) (defaults to: undef)
  • flush_lines (Any) (defaults to: undef)
  • flush_timeout (Any) (defaults to: undef)
  • frac_digits (Any) (defaults to: undef)
  • ip_tos (Any) (defaults to: undef)
  • ip_ttl (Any) (defaults to: undef)
  • keep_alive (Any) (defaults to: undef)
  • localip (Any) (defaults to: undef)
  • localport (Any) (defaults to: undef)
  • log_fifo_size (Any) (defaults to: undef)
  • so_broadcast (Any) (defaults to: undef)
  • so_keepalive (Any) (defaults to: undef)
  • so_rcvbuf (Any) (defaults to: undef)
  • so_sndbuf (Any) (defaults to: undef)
  • spoof_source (Any) (defaults to: undef)
  • suppress (Any) (defaults to: undef)
  • template (Any) (defaults to: undef)
  • template_escape (Any) (defaults to: undef)
  • throttle (Any) (defaults to: undef)
  • tls (Any) (defaults to: undef)


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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'manifests/destination.pp', line 22

define syslogng::destination (
  $ensure   = present,
  $conf_dir = '/etc/syslog-ng',
  $type     = file,
  # options below this are for compat with other modules
  $logpaths        = undef,
  $priority        = undef,
  $transport       = undef,
  $port            = undef,
  $no_multi_line   = undef,
  $flush_lines     = undef,
  $flush_timeout   = undef,
  $frac_digits     = undef,
  $ip_tos          = undef,
  $ip_ttl          = undef,
  $keep_alive      = undef,
  $localip         = undef,
  $localport       = undef,
  $log_fifo_size   = undef,
  $so_broadcast    = undef,
  $so_keepalive    = undef,
  $so_rcvbuf       = undef,
  $so_sndbuf       = undef,
  $spoof_source    = undef,
  $suppress        = undef,
  $template        = undef,
  $template_escape = undef,
  $throttle        = undef,
  $tls             = undef,
) {
  validate_re($ensure, [ '^present', '^absent' ])
  validate_absolute_path($conf_dir)

  $ensure_file = $ensure ? {
    present => file,
    default => $ensure
  }

  case $type {
    file: {
      file { "${conf_dir}/syslog-ng.conf.d/destination.d/${title}.conf":
        ensure => $ensure_file,
        source => "puppet:///modules/syslogng/scl/syslog-ng.conf.d/destination.d/${title}.conf"
      }
    }
    default:{
      # noop
    }
  }
}