Puppet Class: yum::plugin::priorities

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

Overview

Manage the Yum priorities plugin.

Examples:

Declaring the class

include ::yum
include ::yum::plugin::priorities

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')
  • enable (Boolean) (defaults to: true)
  • package_name (String) (defaults to: $::yum::params::priorities_package_name)

See Also:

Since:

  • 1.0.0



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

class yum::plugin::priorities (
  Enum['present', 'absent'] $ensure       = 'present',
  Boolean                   $enable       = true,
  String                    $package_name = $::yum::params::priorities_package_name,
) inherits ::yum::params {

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

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

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