aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/manifests/fstab.pp
blob: 3af316e2808bf23afeac853ae2f69d44d1089120 (plain) (blame)
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
class profile::fstab (
  Optional[Array] $mounts = []
) {
  $mounts.each |$mount| {
    ensure_packages(["parted"])

    unless empty($mount) {
      $infos = split($mount, ';')

      file { $infos[0]:
        ensure => directory,
      } ->
      mount { $infos[0]:
        ensure => mounted,
        device => "UUID=${infos[1]}",
        fstype => $infos[2]
      }

      @profile::monitoring::local_service { "Size on ${infos[0]} partition":
        local => {
          check_command => "check_local_disk!10%!5%!${infos[0]}",
        };
      }
    }
  }
}