Puppet Class: nxlog::config

Defined in:
manifests/config.pp

Overview

Configures NXLog by building a config file

Parameters:

  • conf_dir (Any) (defaults to: $::nxlog::conf_dir)
  • conf_file (Any) (defaults to: $::nxlog::conf_file)
  • nxlog_root (Any) (defaults to: $::nxlog::nxlog_root)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'manifests/config.pp', line 2

class nxlog::config (
  $conf_dir   = $::nxlog::conf_dir,
  $conf_file  = $::nxlog::conf_file,
  $nxlog_root = $::nxlog::nxlog_root,) {
  concat { "${conf_dir}/${conf_file}":
    ensure         => present,
    ensure_newline => true,
  }

  concat::fragment { 'conf_header':
    target  => "${conf_dir}/${conf_file}",
    content => template('nxlog/header.erb'),
    order   => '01',
  }

  # Ensure there is a blank line at the end of the file
  concat::fragment { 'conf_footer':
    target  => "${conf_dir}/${conf_file}",
    content => "\n",
    order   => '99',
  }

}