fix: variant regex results in error

- update the $size variant regex so it actually matches correctly
- default $size to undef, which results in 100%FREE
This commit is contained in:
Ben Vincent 2023-11-05 18:01:16 +11:00
parent 29bc5f39ac
commit cb9af5a2a8

View File

@ -7,7 +7,7 @@
# $vg - Volume group name. No default.
# $pv - Physical volume, typically the disk or partition device path. No default.
# $fstype - Filesystem type for the logical volume. Defaults to 'ext3'.
# $size - Size of the logical volume. No default.
# $size - Size of the logical volume. undef = 100%FREE. Changing $size to cause a resize.
#
class profiles::base::datavol (
Enum['present', 'absent'] $ensure = 'present',
@ -16,7 +16,7 @@ class profiles::base::datavol (
String $pv = '/dev/vdb',
String $lv = 'data',
Stdlib::Absolutepath $mount = '/data',
Variant[Pattern[/^[\d+GTP%FREE]$/], Integer] $size = '100%FREE',
Optional[Variant[Pattern[/^\d+(M|G|T|P)$/], Integer]] $size = undef,
Array $mount_options = ['noatime', 'nodiratime'],
) {