File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1414 Boolean $mountpath_require = false ,
1515 Boolean $mounted = true ,
1616 Boolean $createfs = true ,
17+ Boolean $use_fs_label = false ,
1718 $extents = undef ,
1819 $stripes = undef ,
1920 $stripesize = undef ,
3233
3334 $lvm_device_path = " /dev/${volume_group} /${name} "
3435
36+ $mount_device = $use_fs_label ? {
37+ false => $lvm_device_path ,
38+ true => " LABEL=${name} " ,
39+ }
40+
41+ $mkfs_label = $use_fs_label ? {
42+ false => ' ' ,
43+ # the ending whitespace is required
44+ true => " -L ${name} " ,
45+ }
46+
3547 if $mountpath_require and $fs_type != ' swap' {
3648 Mount {
3749 require => File [$mountpath ],
4052
4153 if $fs_type == ' swap' {
4254 $mount_title = $lvm_device_path
43- $fixed_mountpath = " swap_${lvm_device_path } "
55+ $fixed_mountpath = " swap_${mount_device } "
4456 $fixed_pass = 0
4557 $fixed_dump = 0
4658 $mount_ensure = $ensure ? {
96108 filesystem { $lvm_device_path:
97109 ensure => $ensure ,
98110 fs_type => $fs_type ,
99- options => $ mkfs_options ,
111+ options => " ${mkfs_label}${ mkfs_options} " ,
100112 }
101113 }
102114
113125 mount { $mount_title:
114126 ensure => $mount_ensure ,
115127 name => $fixed_mountpath ,
116- device => $lvm_device_path ,
128+ device => $mount_device ,
117129 fstype => $fs_type ,
118130 options => $options ,
119131 pass => $fixed_pass ,
You can’t perform that action at this time.
0 commit comments