Defined Type: yum::variable

Defined in:
manifests/variable.pp

Overview

Set internal Yum variables.

Examples:

Set an example variable

include ::yum
::yum::variable { 'foo':
  value => 'bar',
}

Parameters:

  • value (String)
  • variable (String) (defaults to: $title)

See Also:

Since:

  • 1.0.0



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/variable.pp', line 15

define yum::variable (
  String $value,
  String $variable = $title,
) {

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

  file { "${::yum::variable_dir}/${variable}":
    ensure  => file,
    owner   => 0,
    group   => 0,
    mode    => '0644',
    content => "${value}\n",
  }
}