]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Merge branch 'master' of ssh://puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet
authorStephen Gran <steve@lobefin.net>
Tue, 27 Jul 2010 08:00:39 +0000 (09:00 +0100)
committerStephen Gran <steve@lobefin.net>
Tue, 27 Jul 2010 08:00:39 +0000 (09:00 +0100)
manifests/site.pp
modules/ferm/manifests/per-host.pp
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]

index f287164dfb23c0d51ee08f13bb573a4f92c65e37..c9afa69bf21540f48eaa4122333c6d8a04550b44 100644 (file)
@@ -98,6 +98,12 @@ node default {
     }
     include ferm::per-host
 
+    case $hostname {
+        ravel,spohr: {
+            include nfs-server
+        }
+    }
+
     case $brokenhosts {
         "true":    { include hosts }
     }
index 5a9d48b69ab6b511945b4207eb82e2e101a905af..a711c07f4ca36771ce70c0addb95214d854a7590 100644 (file)
@@ -17,12 +17,6 @@ class ferm::per-host {
         }
     }
 
-    case $hostname {
-        ravel,spohr: {
-            include ferm::nfs-server
-        }
-    }
-
     case $hostname {
         piatti,samosa: {
            @ferm::rule { "dsa-udd-stunnel":
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;
+    }
+}