3
4
5
6
7
8
9
10
11
12
13
14
15
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
|
# File 'vendor_modules/lvm/manifests/volume_group.pp', line 3
define lvm::volume_group (
Variant[Hash, Array, String] $physical_volumes,
Boolean $createonly = false,
Enum['present', 'absent'] $ensure = present,
Hash $logical_volumes = {},
Boolean $followsymlinks = false,
) {
if is_hash($physical_volumes) {
create_resources(
'lvm::physical_volume',
$physical_volumes,
{
ensure => $ensure,
}
)
}
else {
physical_volume { $physical_volumes:
ensure => $ensure,
}
}
volume_group { $name:
ensure => $ensure,
createonly => $createonly,
physical_volumes => $physical_volumes,
followsymlinks => $followsymlinks,
}
create_resources(
'lvm::logical_volume',
$logical_volumes,
{
ensure => $ensure,
volume_group => $name,
}
)
}
|