OSDN Git Service

add chef-client roles.
authorwhitestar <whitestar@gaea.test>
Fri, 1 Jan 2016 03:42:11 +0000 (12:42 +0900)
committerwhitestar <whitestar@gaea.test>
Fri, 1 Jan 2016 03:42:11 +0000 (12:42 +0900)
roles/chef-client-high-freq.rb [new file with mode: 0644]
roles/chef-client-low-freq.rb [new file with mode: 0644]
roles/chef-client-mid-freq.rb [new file with mode: 0644]
roles/chef-client.rb

diff --git a/roles/chef-client-high-freq.rb b/roles/chef-client-high-freq.rb
new file mode 100644 (file)
index 0000000..84426f1
--- /dev/null
@@ -0,0 +1,36 @@
+#
+# Copyright 2015, whitestar
+#
+# 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.
+#
+
+name 'chef-client-high-freq'
+description 'Chef Client converging with high frequency.'
+
+run_list(
+  'role[chef-client]',
+)
+
+#env_run_lists()
+
+#default_attributes() 
+
+override_attributes(
+  'chef_client' => {
+    'cron' => {
+      'minute' => '*/5',  # default: '0'
+      'hour' => '*',  # default: '0,4,8,12,16,20'
+    },
+  },
+)
+
diff --git a/roles/chef-client-low-freq.rb b/roles/chef-client-low-freq.rb
new file mode 100644 (file)
index 0000000..00d936a
--- /dev/null
@@ -0,0 +1,36 @@
+#
+# Copyright 2015, whitestar
+#
+# 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.
+#
+
+name 'chef-client-low-freq'
+description 'Chef Client converging with low frequency.'
+
+run_list(
+  'role[chef-client]',
+)
+
+#env_run_lists()
+
+#default_attributes() 
+
+override_attributes(
+  'chef_client' => {
+    'cron' => {
+      'minute' => '10',  # default: '0'
+      'hour' => '0,8,16',  # default: '0,4,8,12,16,20'
+    },
+  },
+)
+
diff --git a/roles/chef-client-mid-freq.rb b/roles/chef-client-mid-freq.rb
new file mode 100644 (file)
index 0000000..06ca248
--- /dev/null
@@ -0,0 +1,36 @@
+#
+# Copyright 2015, whitestar
+#
+# 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.
+#
+
+name 'chef-client-mid-freq'
+description 'Chef Client converging with middle frequency.'
+
+run_list(
+  'role[chef-client]',
+)
+
+#env_run_lists()
+
+#default_attributes() 
+
+override_attributes(
+  'chef_client' => {
+    'cron' => {
+      'minute' => '30',  # default: '0'
+      'hour' => '*',  # default: '0,4,8,12,16,20'
+    },
+  },
+)
+
index 89390f5..fc1d99a 100644 (file)
@@ -30,8 +30,8 @@ override_attributes(
   'chef_client' => {
     'init_style' => 'cron',
     'cron' => {
-      'minute' => '*/5',  # default: '0'
-      'hour' => '*',  # default: '0,4,8,12,16,20'
+      'minute' => '0',  # default: '0'
+      'hour' => '0,4,8,12,16,20',  # default: '0,4,8,12,16,20'
       'weekday' => '*',
       'path' => nil,
       'environment_variables' => nil,