Add nfs-server module. Still needs menu.lst modification manually for
authorStephen Gran <steve@lobefin.net>
Tue, 27 Jul 2010 07:59:23 +0000 (08:59 +0100)
committerStephen Gran <steve@lobefin.net>
Tue, 27 Jul 2010 07:59:23 +0000 (08:59 +0100)
moduleless kernels.
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/nfs-server/files/lockd.local.modprobe [new file with mode: 0644]
modules/nfs-server/files/nfs-common.default [new file with mode: 0644]
modules/nfs-server/files/nfs-kernel-server.default [new file with mode: 0644]
modules/nfs-server/manifests/init.pp [new file with mode: 0644]

diff --git a/modules/nfs-server/files/lockd.local.modprobe b/modules/nfs-server/files/lockd.local.modprobe
new file mode 100644 (file)
index 0000000..fc6f11f
--- /dev/null
@@ -0,0 +1 @@
+options lockd nlm_udpport=10003 nlm_tcpport=10003
diff --git a/modules/nfs-server/files/nfs-common.default b/modules/nfs-server/files/nfs-common.default
new file mode 100644 (file)
index 0000000..8e04ee3
--- /dev/null
@@ -0,0 +1,19 @@
+# If you do not set values for the NEED_ options, they will be attempted
+# autodetected; this should be sufficient for most people. Valid alternatives
+# for the NEED_ options are "yes" and "no".
+
+# Do you want to start the statd daemon? It is not needed for NFSv4.
+NEED_STATD=
+
+# Options for rpc.statd.
+#   Should rpc.statd listen on a specific port? This is especially useful
+#   when you have a port-based firewall. To use a fixed port, set this
+#   this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
+#   For more information, see rpc.statd(8) or http://wiki.debian.org/?SecuringNFS
+STATDOPTS='--port 10000 -o 10001'
+
+# Do you want to start the idmapd daemon? It is only needed for NFSv4.
+NEED_IDMAPD=
+
+# Do you want to start the gssd daemon? It is required for Kerberos mounts.
+NEED_GSSD=
diff --git a/modules/nfs-server/files/nfs-kernel-server.default b/modules/nfs-server/files/nfs-kernel-server.default
new file mode 100644 (file)
index 0000000..a6f2d42
--- /dev/null
@@ -0,0 +1,18 @@
+# Number of servers to start up
+RPCNFSDCOUNT=8
+
+# Runtime priority of server (see nice(1))
+RPCNFSDPRIORITY=0
+
+# Options for rpc.mountd.
+# If you have a port-based firewall, you might want to set up
+# a fixed port here using the --port option. For more information, 
+# see rpc.mountd(8) or http://wiki.debian.org/?SecuringNFS
+RPCMOUNTDOPTS="-p 10002"
+
+# Do you want to start the svcgssd daemon? It is only required for Kerberos
+# exports. Valid alternatives are "yes" and "no"; the default is "no".
+NEED_SVCGSSD=
+
+# Options for rpc.svcgssd.
+RPCSVCGSSDOPTS=
diff --git a/modules/nfs-server/manifests/init.pp b/modules/nfs-server/manifests/init.pp
new file mode 100644 (file)
index 0000000..586bcb5
--- /dev/null
@@ -0,0 +1,31 @@
+class nfs-server {
+
+    include ferm::nfs-server
+
+    package {
+        nfs-common: ensure => installed;
+        nfs-kernel-server: ensure => installed;
+    }
+
+    file {
+        "/etc/default/nfs-common":
+            source  => "puppet:///nfs-server/nfs-common.default"),
+            require => Package["nfs-common"],
+            notify  => Exec["nfs-common restart"];
+        "/etc/default/nfs-kernel-server":
+            source  => "puppet:///nfs-server/nfs-kernel-server.default"),
+            require => Package["nfs-kernel-server"],
+            notify  => Exec["nfs-kernel-server restart"];
+        "/etc/modprobe.d/lockd.local":
+            source  => "puppet:///nfs-server/lockd.local.modprobe");
+    }
+
+    exec {
+        "nfs-common restart":
+            path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+            refreshonly => true;
+        "nfs-kernel-server restart":
+            path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+            refreshonly => true;
+    }
+}