Permalink
Browse files

timezone cookbook added

  • Loading branch information...
1 parent b702d23 commit 99f459f00e5a9fcc1030171a6889aa30a883a254 @mdxp committed Sep 2, 2010
View
@@ -0,0 +1,8 @@
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: timezone
+# Attributes:: timezone
+#
+# Copyright 2010, Promet Solutions
+#
+# 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.
+#
+
+default.timezone = "UTC"
View
@@ -0,0 +1,29 @@
+{
+ "recipes": {
+ },
+ "replacing": {
+ },
+ "attributes": {
+ },
+ "maintainer_email": "marius@promethost.com",
+ "groupings": {
+ },
+ "dependencies": {
+ },
+ "recommendations": {
+ },
+ "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES: \n\n= USAGE:\n\n",
+ "suggestions": {
+ },
+ "platforms": {
+ },
+ "license": "Apache 2.0",
+ "version": "0.1.0",
+ "conflicting": {
+ },
+ "name": "timezone",
+ "providing": {
+ },
+ "description": "Configures timezone",
+ "maintainer": "Promet Solutions"
+ }
View
@@ -0,0 +1,6 @@
+maintainer "Promet Solutions"
+maintainer_email "marius@promethost.com"
+license "Apache 2.0"
+description "Configures timezone"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.1"
@@ -0,0 +1,30 @@
+#
+# Author:: Marius Ducea (marius@promethost.com)
+# Cookbook Name:: timezone
+# Recipe:: default
+#
+# Copyright 2010, Promet Solutions
+#
+# 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.
+#
+
+template "/etc/timezone" do
+ source "timezone.erb"
+end
+
+link "/etc/localtime" do
+ filename = "/usr/share/zoneinfo/#{node[:timezone]}"
+ to filename
+ only_if { File.exists? filename }
+end
+
@@ -0,0 +1 @@
+<%= node[:timezone] %>

0 comments on commit 99f459f

Please sign in to comment.