Skip to content

Commit

Permalink
allow managing PVs outside of volume_group until #219 is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
unki committed Dec 6, 2020
1 parent 2c7714b commit d862320
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions manifests/volume_group.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@
Enum['present', 'absent'] $ensure = present,
Hash $logical_volumes = {},
Boolean $followsymlinks = false,
Boolean $manage_pv = true,
) {

if is_hash($physical_volumes) {
create_resources(
'lvm::physical_volume',
$physical_volumes,
{
ensure => $ensure,
if $manage_pv {
if is_hash($physical_volumes) {
create_resources(
'lvm::physical_volume',
$physical_volumes,
{
ensure => $ensure,
}
)
}
else {
physical_volume { $physical_volumes:
ensure => $ensure,
}
)
}
else {
physical_volume { $physical_volumes:
ensure => $ensure,
}
}


volume_group { $name:
ensure => $ensure,
createonly => $createonly,
Expand Down

0 comments on commit d862320

Please sign in to comment.