Skip to content

Commit a79c344

Browse files
David HollingerDavid Hollinger
authored andcommitted
MODULES-4753 Add logic preventing a mount on fs_type swap
Added logic to prevent a mount on fs_type swap in the logical_volume.pp Update unit test for the logical_volume define.
1 parent 536229e commit a79c344

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

manifests/logical_volume.pp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@
101101
}
102102

103103
if $createfs or $ensure != 'present' {
104-
exec { "ensure mountpoint '${fixed_mountpath}' exists":
105-
path => [ '/bin', '/usr/bin' ],
106-
command => "mkdir -p ${fixed_mountpath}",
107-
unless => "test -d ${fixed_mountpath}",
108-
before => Mount[$mount_title],
104+
if $fs_type != 'swap' {
105+
exec { "ensure mountpoint '${fixed_mountpath}' exists":
106+
path => [ '/bin', '/usr/bin' ],
107+
command => "mkdir -p ${fixed_mountpath}",
108+
unless => "test -d ${fixed_mountpath}",
109+
before => Mount[$mount_title],
110+
}
109111
}
110112

111113
mount { $mount_title:

0 commit comments

Comments
 (0)