Puppet Class: pulsevtm::log_export_system___authentication_log

Defined in:
manifests/log_export_system___authentication_log.pp

Overview

class: pulsevtm::log_export_system___authentication_log

This class is a direct implementation of brocadvtm::log_export

Please refer to the documentation in that module for more information

Parameters:

  • ensure (Any) (defaults to: present)
  • basic__appliance_only (Any) (defaults to: true)
  • basic__enabled (Any) (defaults to: true)
  • basic__files (Any) (defaults to: '["/var/log/auth.log*"]')
  • basic__history (Any) (defaults to: 'none')
  • basic__history_period (Any) (defaults to: 10)
  • basic__metadata (Any) (defaults to: '[{"name":"source","value":"authlog"},{"name":"sourcetype","value":"syslog"}]')
  • basic__note (Any) (defaults to: 'The operating system\'s authentication log.')


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
36
37
38
39
40
41
42
43
44
45
46
# File 'manifests/log_export_system___authentication_log.pp', line 7

class pulsevtm::log_export_system___authentication_log (
  $ensure                = present,
  $basic__appliance_only = true,
  $basic__enabled        = true,
  $basic__files          = '["/var/log/auth.log*"]',
  $basic__history        = 'none',
  $basic__history_period = 10,
  $basic__metadata       = '[{"name":"source","value":"authlog"},{"name":"sourcetype","value":"syslog"}]',
  $basic__note           = 'The operating system\'s authentication log.',
){
  include pulsevtm
  $ip              = $pulsevtm::rest_ip
  $port            = $pulsevtm::rest_port
  $user            = $pulsevtm::rest_user
  $pass            = $pulsevtm::rest_pass
  $purge           = $pulsevtm::purge
  $purge_state_dir = $pulsevtm::purge_state_dir

  info ("Configuring log_export_system___authentication_log ${name}")
  vtmrest { 'log_export/System%20-%20authentication%20log':
    ensure   => $ensure,
    before   => Class[pulsevtm::purge],
    endpoint => "https://${ip}:${port}/api/tm/6.0/config/active",
    username => $user,
    password => $pass,
    content  => template('pulsevtm/log_export.erb'),
    type     => 'application/json',
    internal => 'log_export_system___authentication_log',
    failfast => $pulsevtm::failfast,
    debug    => $pulsevtm::debug,
  }

  if ( $purge ) {
    ensure_resource('file', "${purge_state_dir}/log_export", {ensure => present})
    file_line { 'log_export/System%20-%20authentication%20log':
      line => 'log_export/System%20-%20authentication%20log',
      path => "${purge_state_dir}/log_export",
    }
  }
}