Permalink
Browse files

tie chef code to new rubix gem version 0.5.10

  • Loading branch information...
1 parent 8926d39 commit 523492d63e516f861ea8ddb043148449649a5b25 Dhruv Bansal committed Aug 13, 2012
Showing with 7 additions and 2 deletions.
  1. +1 −1 cookbooks/zabbix/libraries/rubix_connection.rb
  2. +6 −1 cookbooks/zabbix/providers/host.rb
@@ -3,7 +3,7 @@ class Chef
module RubixConnection
# The version of Rubix we expect to use.
- RUBIX_VERSION = '0.5.4'
+ RUBIX_VERSION = '0.5.10'
# For a pool of shared connections to Zabbix API servers.
CONNECTIONS = { }
@@ -23,7 +23,12 @@ def load_current_resource
load_host_groups
load_templates
load_user_macros
- load_machine_fields unless virtual? || new_resource.monitored == false
+ if virtual?
+ self.zabbix_host.use_ip = true
+ self.zabbix_host.ip = '0.0.0.0'
+ else
+ load_machine_fields unless new_resource.monitored == false
+ end
rescue ArgumentError, ::Rubix::Error, ::Errno::ECONNREFUSED => e
::Chef::Log.warn("Could not create Zabbix host #{new_resource.name}: #{e.message}")
end

0 comments on commit 523492d

Please sign in to comment.