Puppet Class: yum::plugin::fastestmirror
- Inherits:
- ::yum::params
- Defined in:
- manifests/plugin/fastestmirror.pp
Overview
Manage the Yum fastestmirror plugin.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'manifests/plugin/fastestmirror.pp', line 25
class yum::plugin::fastestmirror (
Enum['present', 'absent'] $ensure = 'present',
Boolean $enable = true,
String $package_name = $::yum::params::fastestmirror_package_name,
Optional[Boolean] $verbose = false,
Optional[Boolean] $always_print_best_host = true,
Optional[Integer[0]] $socket_timeout = 3,
Optional[String] $hostfilepath = 'timedhosts.txt',
Optional[Integer[0]] $maxhostfileage = 10,
Optional[Integer[0]] $maxthreads = 15,
Optional[Array[String, 1]] $exclude = undef,
Optional[Array[String, 1]] $include_only = undef,
Optional[String] $prefer = undef,
Optional[Boolean] $downgrade_ftp = undef,
) inherits ::yum::params {
if ! defined(Class['::yum']) {
fail('You must include the yum base class before using the yum::plugin::fastestmirror class')
}
package { $package_name:
ensure => $ensure,
tag => [
"bodgit::${module_name}",
],
}
if $ensure == 'present' {
::yum::plugin { 'fastestmirror':
content => template("${module_name}/fastestmirror.conf.erb"),
require => Package[$package_name],
}
}
}
|