Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass yes_arg parameter to lvm::volume resources #318

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions manifests/volume.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# The block device to ensure a physical_volume has been
# created on The volume_group to ensure is created on the
# physical_volume provided by the pv parameter.
#
#

# @param fstype The type of filesystem to create on the logical
# volume.
Expand All @@ -24,10 +24,12 @@

# @param size The size the logical_voluem should be.

# @param extents The number of logical extents to allocate for the new logical volume.
# @param extents The number of logical extents to allocate for the new logical volume.
# Set to undef to use all available space

# @param initial_size The initial size of the logical volume.
# @param yes_flag If set to true, do not prompt for confirmation interactively but always assume the answer yes.

# @param initial_size The initial size of the logical volume.
# This will only apply to newly-created volumes
#
# === Examples
Expand Down Expand Up @@ -68,7 +70,8 @@
Optional[String[1]] $fstype = undef,
Optional[String[1]] $size = undef,
Optional[Variant[String[1], Integer]] $extents = undef,
Optional[String[1]] $initial_size = undef
Optional[String[1]] $initial_size = undef,
Boolean $yes_flag = false,
) {
if ($name == undef) {
fail("lvm::volume \$name can't be undefined")
Expand Down Expand Up @@ -96,6 +99,7 @@
volume_group => $vg,
size => $size,
initial_size => $initial_size,
yes_flag => $yes_flag,
before => Volume_group[$vg],
}
}
Expand All @@ -108,6 +112,7 @@
ensure => absent,
volume_group => $vg,
size => $size,
yes_flag => $yes_flag,
}
}
#
Expand All @@ -132,6 +137,7 @@
volume_group => $vg,
size => $size,
extents => $extents,
yes_flag => $yes_flag,
require => Volume_group[$vg],
}

Expand Down