1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'manifests/create.pp', line 1
class mount::create {
define mnt_point($lvol,$vg,$pvol,$fstype="ext4",$size,$mnt_opts="defaults",$dump="0",$passno="0") {
lvm::volume { $lvol:
ensure => present,
vg => "$vg",
pv => "$pvol",
fstype => "$fstype",
size => "$size",
} ->
fstab { $title:
source => "/dev/$vg/$lvol",
dest => $title,
type => $fstype,
opts => $mnt_opts,
dump => $dump,
passno => $passno,
} ->
mounts { $title:
ensure => present,
source => "/dev/$vg/$lvol",
dest => $title,
type => $fstype,
opts => $mnt_opts,
} ->
exec { "mount_$title":
command => "/bin/mount $title",
unless => "/bin/grep -qw $title /proc/mounts",
}
}
}
|