Skip to content

Commit

Permalink
named attributes may not be hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattray committed May 12, 2011
1 parent 1da353b commit 39e673a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions zenoss/metadata.rb
Expand Up @@ -2,7 +2,7 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures Zenoss and registers nodes as devices"
version "0.7"
version "0.7.1"
depends "apt"
depends "openssh"
depends "openssl"
Expand All @@ -11,7 +11,6 @@
recipe "zenoss::client", "Includes the `openssh` recipe and adds the device to the Zenoss server for monitoring."
recipe "zenoss::server", "Installs Zenoss, handling and configuring all the dependencies while adding Device Classes, Groups, Systems and Locations. All nodes using the `zenoss::client` recipe are added for monitoring."


#start with just the .deb, perhaps switch to stack installer and/or .rpm
%w{ debian ubuntu redhat centos scientific }.each do |os|
supports os
Expand Down
3 changes: 3 additions & 0 deletions zenoss/providers/zenbatchload.rb
Expand Up @@ -4,6 +4,9 @@
locations = new_resource.locations
groups = new_resource.groups
batch = ""
Chef::Log.debug "zenbatchload devices:#{devices}"
Chef::Log.debug "zenbatchload locations:#{locations}"
Chef::Log.debug "zenbatchload groups:#{groups}"
#sort the hash and construct the batchload file
devices.keys.sort!.each do |dclass|
batch += "#{dclass}\n"
Expand Down
3 changes: 2 additions & 1 deletion zenoss/recipes/server.rb
Expand Up @@ -235,7 +235,8 @@
end
end
end
zenoss_zenbatchload devices do
zenoss_zenbatchload "zenbatchloading devices" do
devices devices
locations locationlist
groups grouplist
action :run
Expand Down
2 changes: 1 addition & 1 deletion zenoss/resources/zenbatchload.rb
@@ -1,5 +1,5 @@
actions :run

attribute :devices, :kind_of => Hash, :default => {}, :name_attribute => true
attribute :devices, :kind_of => Hash, :default => {}
attribute :locations, :kind_of => Array, :default => []
attribute :groups, :kind_of => Array, :default => []

0 comments on commit 39e673a

Please sign in to comment.