Permalink
Browse files

use strings for ohai attribute names, update metadata

  • Loading branch information...
jtimberman committed Jan 28, 2011
1 parent 4b1bb35 commit 1265c0be1774dcb9565f517daa4aa9fa0ada6990
Showing with 29 additions and 7 deletions.
  1. +1 −1 attributes/default.rb
  2. +15 −1 metadata.json
  3. +9 −1 metadata.rb
  4. +4 −4 recipes/default.rb
View
@@ -18,4 +18,4 @@
#
# FHS location would be /var/lib/chef/ohai_plugins or similar.
-default[:ohai][:plugin_path] = "/etc/chef/ohai_plugins"
+default["ohai"]["plugin_path"] = "/etc/chef/ohai_plugins"
View
@@ -20,11 +20,25 @@
"replacing": {
},
"attributes": {
+ "ohai/plugin_path": {
+ "display_name": "Ohai Plugin Path",
+ "description": "Distribute plugins to this path.",
+ "type": "string",
+ "required": "optional",
+ "default": "/etc/chef/ohai_plugins",
+ "choice": [
+
+ ],
+ "calculated": false,
+ "recipes": [
+
+ ]
+ }
},
"groupings": {
},
"recipes": {
"ohai::default": "Distributes a directory of custom ohai plugins"
},
- "version": "0.9.0"
+ "version": "1.0.0"
}
View
@@ -3,5 +3,13 @@
license "Apache 2.0"
description "Distributes a directory of custom ohai plugins"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "0.9.0"
+version "1.0.0"
+
recipe "ohai::default", "Distributes a directory of custom ohai plugins"
+
+attribute "ohai/plugin_path",
+ :display_name => "Ohai Plugin Path",
+ :description => "Distribute plugins to this path.",
+ :type => "string",
+ :required => "optional",
+ :default => "/etc/chef/ohai_plugins"
View
@@ -17,10 +17,10 @@
# limitations under the License.
#
-Ohai::Config[:plugin_path] << node.ohai.plugin_path
-Chef::Log.info("ohai plugins will be at: #{node.ohai.plugin_path}")
+Ohai::Config[:plugin_path] << node['ohai']['plugin_path']
+Chef::Log.info("ohai plugins will be at: #{node['ohai']['plugin_path']}")
-d = directory node.ohai.plugin_path do
+d = directory node['ohai']['plugin_path'] do
owner 'root'
group 'root'
mode 0755
@@ -30,7 +30,7 @@
d.run_action(:create)
-rd = remote_directory node.ohai.plugin_path do
+rd = remote_directory node['ohai']['plugin_path'] do
source 'plugins'
owner 'root'
group 'root'

0 comments on commit 1265c0b

Please sign in to comment.