Puppet Class: mcelog

Defined in:
manifests/init.pp

Summary

Manage mcelog

Overview

Parameters:

  • package_name (String)

    The name of the package.

  • config_file_path (Stdlib::Absolutepath)

    The path of mcelog configuration file.

  • service_name (String)

    The name of the service.

  • config_file_content (Optional[String]) (defaults to: undef)

    Literal string to write to config_file_path.



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
# File 'manifests/init.pp', line 13

class mcelog (
  String $package_name,
  Stdlib::Absolutepath $config_file_path,
  String $service_name,
  Optional[String] $config_file_content = undef,
) {
  ensure_packages($package_name)

  if $config_file_content {
    file { 'mcelog.conf':
      ensure  => 'file',
      path    => $config_file_path,
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
      content => $config_file_content,
      require => Package[$package_name],
      notify  => Service['mcelog'],
    }
  }

  service { 'mcelog':
    ensure  => running,
    enable  => true,
    name    => $service_name,
    require => Package[$package_name],
  }
}