]>
Commit | Line | Data |
---|---|---|
81ec6f92 IB |
1 | class role::file_store ( |
2 | Optional[Array] $nfs_mounts = ["cardano"], | |
3 | Optional[String] $mountpoint = "/fichiers1", | |
4 | ) { | |
5 | include "base_installation" | |
6 | ||
7 | include "profile::fstab" | |
8 | include "profile::tools" | |
9 | include "profile::monitoring" | |
9fcc3f8f | 10 | include "profile::kerberos::client" |
81ec6f92 IB |
11 | |
12 | unless empty($mountpoint) { | |
13 | class { "::nfs": | |
14 | server_enabled => true, | |
15 | nfs_v4 => true, | |
16 | nfs_v4_export_root => '/exports', | |
17 | nfs_v4_export_root_clients => 'localhost(rw)', | |
18 | require => Mount[$mountpoint], | |
19 | } | |
20 | ||
21 | $nfs_mounts.each |$nfs_mount| { | |
22 | file { "$mountpoint/$nfs_mount": | |
23 | ensure => "directory", | |
24 | mode => "0755", | |
25 | owner => "nobody", | |
26 | group => "nobody", | |
27 | require => Mount[$mountpoint], | |
28 | } -> | |
29 | nfs::server::export { "$mountpoint/$nfs_mount": | |
30 | owner => "nobody", | |
31 | group => "nobody", | |
32 | ensure => "present", | |
33 | clients => "immae.eu(rw,secure,sync,all_squash,sec=krb5p)", | |
34 | } | |
35 | } | |
36 | } | |
37 | } |