Skip to content

Commit bd55a4a

Browse files
committed
Added node[cloud].nil check to avoid breakage on non-cloud servers
1 parent 69837e5 commit bd55a4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

recipes/entity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Chef::Recipe
3333

3434

3535
response["values"].each do |value|
36-
unless value["ip_addresses"].nil?
36+
unless value["ip_addresses"].nil? || node["cloud"].nil?
3737
if value["ip_addresses"]["private0_v4"].eql? node["cloud"]["local_ipv4"]
3838
node.set['cloud_monitoring']['label'] = value["label"]
3939
end

0 commit comments

Comments
 (0)