Skip to content

Commit d6aa0eb

Browse files
committed
allow managing PVs outside of volume_group until #219 is fixed
1 parent 06c8bb1 commit d6aa0eb

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

manifests/volume_group.pp

+14-12
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@
66
Enum['present', 'absent'] $ensure = present,
77
Hash $logical_volumes = {},
88
Boolean $followsymlinks = false,
9+
Boolean $manage_pv = true,
910
) {
1011

11-
if is_hash($physical_volumes) {
12-
create_resources(
13-
'lvm::physical_volume',
14-
$physical_volumes,
15-
{
16-
ensure => $ensure,
12+
if $manage_pv {
13+
if is_hash($physical_volumes) {
14+
create_resources(
15+
'lvm::physical_volume',
16+
$physical_volumes,
17+
{
18+
ensure => $ensure,
19+
}
20+
)
21+
}
22+
else {
23+
physical_volume { $physical_volumes:
24+
ensure => $ensure,
1725
}
18-
)
19-
}
20-
else {
21-
physical_volume { $physical_volumes:
22-
ensure => $ensure,
2326
}
2427
}
2528

26-
2729
volume_group { $name:
2830
ensure => $ensure,
2931
createonly => $createonly,

0 commit comments

Comments
 (0)