]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nfs/recipes/server.rb
Update NFS server recipe for Ubuntu 16.04
[chef.git] / cookbooks / nfs / recipes / server.rb
index f75e44e889880f920f4db5986f4fbd332ef4d3fa..26159545a9c4985e704e8ded9b9cdbdec5a4e67d 100644 (file)
 package "nfs-kernel-server"
 
 service "rpcbind" do
-  provider Chef::Provider::Service::Upstart
   action [:enable, :start]
   supports :status => true, :restart => true, :reload => true
 end
 
-service "nfs-kernel-server" do
-#   action [ :enable, :start ]
-  supports :status => true, :restart => true, :reload => true
-end
+service "nfs-kernel-server" do
+  action [:enable, :start]
+  supports :status => true, :restart => true, :reload => true
+end
 
 exports = {}
 
@@ -41,11 +40,11 @@ search(:node, "*:*") do |client|
     client.ipaddresses do |address|
       exports[mount[:path]] ||= {}
 
-      if mount[:readonly]
-        exports[mount[:path]][address] = "ro"
-      else
-        exports[mount[:path]][address] = "rw"
-      end
+      exports[mount[:path]][address] = if mount[:readonly]
+                                         "ro"
+                                       else
+                                         "rw"
+                                       end
     end
   end
 end