Puppet Class: pupmod::master::reports

Inherits:
pupmod::master
Defined in:
manifests/master/reports.pp

Overview

This class simply controls settings around client reports on the system.

Most importantly, it allows for purging the reports.

Parameters:

  • vardir (Stdlib::AbsolutePath) (defaults to: $pupmod::master::vardir)

    The directory where reports should be stored.

  • purge (Boolean) (defaults to: true)

    Whether or not to purge old reports from the system.

  • purge_keep_days (Integer) (defaults to: 7)

    The number of days of reports to keep around on the system.

  • purge_verbose (Optional[Boolean]) (defaults to: undef)

    DEPRECATED

    • See the systemd tmpfiles logs for details

  • port (Optional[Simplib::Port]) (defaults to: undef)

    DEPRECATED

Author:



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'manifests/master/reports.pp', line 24

class pupmod::master::reports (
  Stdlib::AbsolutePath    $vardir          = $pupmod::master::vardir,
  Boolean                 $purge           = true,
  Integer                 $purge_keep_days = 7,
  Optional[Boolean]       $purge_verbose   = undef,
  Optional[Simplib::Port] $port            = undef
) inherits pupmod::master {

  assert_private()

  # Remove this when the deprecated options above are removed
  file { '/etc/cron.daily/puppet_client_report_purge': ensure => 'absent' }

  $_ensure = $purge ? { true => 'present', default => 'absent' }

  systemd::tmpfile { 'purge_puppetserver_reports.conf':
    ensure  => $_ensure,
    content => "e ${vardir}/reports - - - ${purge_keep_days}d"
  }
}