promote develop to master #6
@ -17,7 +17,11 @@ class profiles::base::datavol (
|
|||||||
String $lv = 'data',
|
String $lv = 'data',
|
||||||
Stdlib::Absolutepath $mount = '/data',
|
Stdlib::Absolutepath $mount = '/data',
|
||||||
Optional[Variant[Pattern[/^\d+(M|G|T|P)$/], Integer]] $size = undef,
|
Optional[Variant[Pattern[/^\d+(M|G|T|P)$/], Integer]] $size = undef,
|
||||||
Array $mount_options = ['noatime', 'nodiratime'],
|
Array[Enum[
|
||||||
|
'defaults', 'ro', 'rw', 'sync', 'async',
|
||||||
|
'noatime', 'nodiratime', 'noexec', 'nosuid',
|
||||||
|
'nodev', 'remount', 'auto', 'noauto'
|
||||||
|
]] $mount_options = ['noatime', 'nodiratime'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# Ensure the physical volume exists
|
# Ensure the physical volume exists
|
||||||
@ -49,14 +53,20 @@ class profiles::base::datavol (
|
|||||||
before => Mount[$mount],
|
before => Mount[$mount],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ensure the mountpath exists
|
||||||
|
file { $mount:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
}
|
||||||
|
|
||||||
# Ensure the logical volume is mounted at the desired location
|
# Ensure the logical volume is mounted at the desired location
|
||||||
mount { $mount:
|
mount { $mount:
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
device => "/dev/${vg}/${lv}",
|
device => "/dev/${vg}/${lv}",
|
||||||
fstype => $fstype,
|
fstype => $fstype,
|
||||||
options => 'defaults',
|
options => $mount_options.join(','),
|
||||||
dump => 0,
|
|
||||||
pass => 2,
|
|
||||||
require => Filesystem["/dev/${vg}/${lv}"],
|
require => Filesystem["/dev/${vg}/${lv}"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user