Puppet Class: systemd::oomd

Defined in:
manifests/oomd.pp

Summary

This class manages and configures oomd.

Overview



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'manifests/oomd.pp', line 4

class systemd::oomd {
  assert_private()

  service { 'systemd-oomd':
    ensure => running,
    enable => true,
  }
  $systemd::oomd_settings.each |$option, $value| {
    ini_setting {
      $option:
        path    => '/etc/systemd/oomd.conf',
        section => 'OOM',
        setting => $option,
        notify  => Service['systemd-oomd'],
    }
    if $value =~ Hash {
      Ini_setting[$option] {
        * => $value,
      }
    } else {
      Ini_setting[$option] {
        value   => $value,
      }
    }
  }
}