diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-19 17:13:37 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-19 18:11:32 +0100 |
commit | f25ad097f24e0d39d5dd9ac2cef39760e671e08f (patch) | |
tree | b04d72ebb169e7d21285aafd807c83bd6e0d813d /modules/profile/manifests | |
parent | a55a5e4aa468d550fcdf5bbeafe42dea13773e37 (diff) | |
download | Puppet-f25ad097f24e0d39d5dd9ac2cef39760e671e08f.tar.gz Puppet-f25ad097f24e0d39d5dd9ac2cef39760e671e08f.tar.zst Puppet-f25ad097f24e0d39d5dd9ac2cef39760e671e08f.zip |
Don’t mount unavailables mounts
Diffstat (limited to 'modules/profile/manifests')
-rw-r--r-- | modules/profile/manifests/fstab.pp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/profile/manifests/fstab.pp b/modules/profile/manifests/fstab.pp new file mode 100644 index 0000000..5f2e58e --- /dev/null +++ b/modules/profile/manifests/fstab.pp | |||
@@ -0,0 +1,18 @@ | |||
1 | class profile::fstab ( | ||
2 | Optional[Array] $mounts = [] | ||
3 | ) { | ||
4 | $mounts.each |$mount| { | ||
5 | unless empty($mount) { | ||
6 | $infos = split($mount, ';') | ||
7 | |||
8 | file { $infos[0]: | ||
9 | ensure => directory, | ||
10 | } -> | ||
11 | mount { $infos[0]: | ||
12 | ensure => mounted, | ||
13 | device => "UUID=${infos[1]}", | ||
14 | fstype => $infos[2] | ||
15 | } | ||
16 | } | ||
17 | } | ||
18 | } | ||