Permalink
Browse files

initial directory management commit, and line & nfs submodule additions

  • Loading branch information...
1 parent 91f282c commit 2645ec1c51ec1347d5261a019b2f5851f5584d39 @troyready troyready committed Jan 4, 2013
View
@@ -40,3 +40,9 @@
[submodule "smbfs"]
path = smbfs
url = https://github.com/realityforge/chef-smbfs
+[submodule "line"]
+ path = line
+ url = https://github.com/someara/line-cookbook
+[submodule "nfs"]
+ path = nfs
+ url = git://github.com/atomic-penguin/cookbook-nfs.git
@@ -0,0 +1,12 @@
+# CHANGELOG for directory_management
+
+This file is used to list changes made in each version of directory_management.
+
+## 0.1.0:
+
+* Initial release of directory_management
+
+- - -
+Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
+
+The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
@@ -0,0 +1,19 @@
+Description
+===========
+
+This is a very simple cookbook which contains recipes for directory management. It is intended for use along other cookbooks which require directories to be in place, have certain permissions, etc.
+
+Requirements
+============
+
+None
+
+Attributes
+==========
+
+None
+
+Usage
+=====
+
+See recipes
@@ -0,0 +1,7 @@
+maintainer "Biola University"
+maintainer_email "troy.ready@biola.edu"
+license "Apache 2.0"
+description "Installs/Configures directory_management"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "0.1.0"
+depends "nfs"
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: directory_management
+# Recipe:: default
+#
+# Copyright 2013, Biola University
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Nothing here for now
@@ -0,0 +1,44 @@
+#
+# Cookbook Name:: directory_management
+# Recipe:: nfs_client
+#
+# Copyright 2013, Biola University
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include_recipe "nfs::default"
+
+# First, check attributes for mounts to remove
+if node['nfs']['mounts_to_remove'] != nil
+ node['nfs']['mounts_to_remove'].each_pair do |path,config|
+ mount path.to_s do
+ action [:umount, :disable]
+ ignore_failure true
+ end
+ end
+end
+
+
+# Read the attributes for the node's specified mount points and create the appropriate directory
+node['nfs']['mounts'].each_pair do |path,config|
+ directory path do
+ action :create
+ end
+ mount path.to_s do
+ device config['device']
+ fstype config['fstype']
+ options config['options'] if config['options']
+ action [:mount, :enable] if config['fstab'] == true
+ end
+end
@@ -0,0 +1,25 @@
+#
+# Cookbook Name:: directory_management
+# Recipe:: smbfs
+#
+# Copyright 2013, Biola University
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Read the attributes for the node's specified mount points and create the appropriate directory
+node['smbfs']['mounts'].each_pair do |path,config|
+ directory path do
+ action :create
+ end
+end
1 line
Submodule line added at deb7df
1 nfs
Submodule nfs added at 0b99f4

0 comments on commit 2645ec1

Please sign in to comment.