Defined Type: yum::plugin::versionlock::entry

Defined in:
manifests/plugin/versionlock/entry.pp

Overview

Manage entries in the Yum versionlock plugin lock list.

Examples:

Exclude a particular package/version from being installed

include ::yum
include ::yum::plugin::versionlock
::yum::plugin::versionlock::entry { 'kernel':
  packages => [
    '!0:kernel-2.6.32-696.3.2.el6.*',
  ],
}

Parameters:

  • packages (Array[String, 1])

See Also:

Since:

  • 1.0.0



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'manifests/plugin/versionlock/entry.pp', line 17

define yum::plugin::versionlock::entry (
  Array[String, 1] $packages,
) {

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

  ::concat::fragment { "${::yum::plugin::versionlock::locklist} ${title}":
    content => "${join($packages, "\n")}\n",
    target  => $::yum::plugin::versionlock::locklist,
  }
}