Puppet Class: yum::plugin::kabi

Inherits:
::yum::params
Defined in:
manifests/plugin/kabi.pp

Overview

Description

Examples:

Declaring the class

include ::yum
include ::yum::plugin::kabi

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')
  • enable (Boolean) (defaults to: true)
  • package_name (String) (defaults to: $::yum::params::kabi_package_name)
  • enforce (Optional[Boolean]) (defaults to: undef)
  • whitelists (Optional[Stdlib::Absolutepath]) (defaults to: '/lib/modules/kabi-current')

See Also:

Since:

  • 1.0.0



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/plugin/kabi.pp', line 17

class yum::plugin::kabi (
  Enum['present', 'absent']      $ensure       = 'present',
  Boolean                        $enable       = true,
  String                         $package_name = $::yum::params::kabi_package_name,
  Optional[Boolean]              $enforce      = undef,
  Optional[Stdlib::Absolutepath] $whitelists   = '/lib/modules/kabi-current',
) inherits ::yum::params {

  if ! defined(Class['::yum']) {
    fail('You must include the yum base class before using the yum::plugin::kabi class')
  }

  package { $package_name:
    ensure => $ensure,
    tag    => [
      "bodgit::${module_name}",
    ],
  }

  if $ensure == 'present' {
    ::yum::plugin { 'kabi':
      content => template("${module_name}/kabi.conf.erb"),
      require => Package[$package_name],
    }
  }
}