[submodule "external_modules/augeasproviders_core"]
path = external_modules/augeasproviders_core
url = git://git.immae.eu/github/hercules-team/augeasproviders_core.git
+[submodule "external_modules/nfs"]
+ path = external_modules/nfs
+ url = git://git.immae.eu/github/derdanne/puppet-nfs
--- /dev/null
+class role::file_store (
+ Optional[Array] $nfs_mounts = ["cardano"],
+ Optional[String] $mountpoint = "/fichiers1",
+) {
+ include "base_installation"
+
+ include "profile::fstab"
+ include "profile::tools"
+ include "profile::monitoring"
+
+ unless empty($mountpoint) {
+ class { "::nfs":
+ server_enabled => true,
+ nfs_v4 => true,
+ nfs_v4_export_root => '/exports',
+ nfs_v4_export_root_clients => 'localhost(rw)',
+ require => Mount[$mountpoint],
+ }
+
+ $nfs_mounts.each |$nfs_mount| {
+ file { "$mountpoint/$nfs_mount":
+ ensure => "directory",
+ mode => "0755",
+ owner => "nobody",
+ group => "nobody",
+ require => Mount[$mountpoint],
+ } ->
+ nfs::server::export { "$mountpoint/$nfs_mount":
+ owner => "nobody",
+ group => "nobody",
+ ensure => "present",
+ clients => "immae.eu(rw,secure,sync,all_squash,sec=krb5p)",
+ }
+ }
+ }
+}