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.
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
}
}
}
|