Defined Type: cgroups::group

Defined in:
manifests/group.pp

Overview

Define: cgroups::group

Manage cgroup entries in /etc/cgconfig.d

Parameters:

  • permissions (Any) (defaults to: {})
  • controllers (Any) (defaults to: {})
  • target_path (Any) (defaults to: '/etc/cgconfig.d')


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

define cgroups::group (
  $permissions = {},
  $controllers = {},
  $target_path = '/etc/cgconfig.d',
) {

  # variables preparation
  $fscompat_name = regsubst($name, '\/', '-')
  $target = "${target_path}/${fscompat_name}.conf"

  # variables validation
  validate_hash($permissions)
  validate_hash($controllers)
  validate_absolute_path($target)

  # functionality
  include ::cgroups

  file { $target:
    ensure  => file,
    content => template('cgroups/group.conf.erb'),
    notify  => Service[$cgroups::service_name],
  }
}