Puppet Class: zram::install

Defined in:
manifests/install.pp

Summary

Add or remove packages to enable zram management

Overview

Parameters:

  • required (Variant[ Undef, String[1], Array[String[1]] ]) (defaults to: undef)

    Packages required for zram to function

  • conflicts (Variant[ Undef, String[1], Array[String[1]] ]) (defaults to: undef)

    Packages that conflict with zram

  • required_ensure (String[1]) (defaults to: 'installed')

    ‘ensure` attribute of `required` packages

  • conflicts_ensure (String[1]) (defaults to: 'absent')

    ‘ensure` attribute of `conflicts` packages



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

class zram::install (
  Variant[
    Undef,
    String[1],
    Array[String[1]]
  ]                  $required         = undef,
  Variant[
    Undef,
    String[1],
    Array[String[1]]
  ]                  $conflicts        = undef,
  String[1]          $required_ensure  = 'installed',
  String[1]          $conflicts_ensure = 'absent',
) {
  assert_private()

  if $required {
    package { $required:
      ensure => $required_ensure,
    }
  }

  if $conflicts {
    package { $conflicts:
      ensure => $conflicts_ensure,
    }
  }
}