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,
}
}
}
|