Puppet Class: storm::repo

Defined in:
manifests/repo.pp

Summary

Choose which StoRM repository you want to intall and enable. Also a custom list of repository URL can be specified.

Overview

Examples:

Install all the repositories and enable only nightly repo as follow:

class { 'storm::repo':
  enabled => ['stable'],
}

Parameters:

  • installed (Array[Enum['stable', 'beta', 'nightly']])

    The list of repositories that have to be installed. Allowed values are stable, beta and nightly. Optional.

  • enabled (Array[Enum['stable', 'beta', 'nightly']])

    The list of repositories that have to be enabled. Allowed values are stable, beta and nightly. Optional.

  • extra (Array[Storm::CustomRepo])

    A list of repository that have to be created. Optional.



16
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'manifests/repo.pp', line 16

class storm::repo (

  Array[Enum['stable', 'beta', 'nightly']] $installed,
  Array[Enum['stable', 'beta', 'nightly']] $enabled,

  Array[Storm::CustomRepo] $extra,

) {
  $base = 'https://repo.cloud.cnaf.infn.it/repository'
  $el = $facts['os']['distro']['release']['major']

  $installed.each | $repo | {
    $enabled = $repo in $enabled ? { true => 1, default => 0 }
    $name = "storm-${repo}-centos${el}"
    $baseurl = "${base}/storm-rpm-${repo}/centos${el}/"

    yumrepo { $name:
      ensure   => present,
      descr    => $name,
      baseurl  => $baseurl,
      enabled  => $enabled,
      protect  => 1,
      priority => 1,
      gpgcheck => 0,
    }
  }

  $extra.each | $repo | {
    $name = $repo[name]
    $baseurl = $repo[baseurl]

    yumrepo { $name:
      ensure   => present,
      descr    => $name,
      baseurl  => $baseurl,
      enabled  => 1,
      protect  => 1,
      priority => 1,
      gpgcheck => 0,
    }
  }
}