summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2016-04-07 16:31:59 -0700
committerTim Smith <tsmith84@gmail.com>2016-04-07 16:31:59 -0700
commit8dc538c9e065d6a71be9f27ce30e85c32f1a520c (patch)
tree1f019c8d942f3cc1b4f390af3ae4ff58a76d03b9
parent509c105df6d44928fe9f28dcf1832fb4a07325db (diff)
downloadohai-8dc538c9e065d6a71be9f27ce30e85c32f1a520c.tar.gz
Ensure we when values exist, but they don't match
Previously we only got false logging when we rescued
-rw-r--r--lib/ohai/plugins/ec2.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ohai/plugins/ec2.rb b/lib/ohai/plugins/ec2.rb
index aef493b1..252eb425 100644
--- a/lib/ohai/plugins/ec2.rb
+++ b/lib/ohai/plugins/ec2.rb
@@ -43,6 +43,9 @@ Ohai.plugin(:EC2) do
if dmi[:bios][:all_records][0][:Version] =~ /amazon/
Ohai::Log.debug("ec2 plugin: has_ec2_dmi? == true")
true
+ else
+ Ohai::Log.debug("ec2 plugin: has_ec2_dmi? == false")
+ false
end
rescue NoMethodError
Ohai::Log.debug("ec2 plugin: has_ec2_dmi? == false")
@@ -72,6 +75,9 @@ Ohai.plugin(:EC2) do
if kernel[:os_info][:organization] =~ /Amazon/
Ohai::Log.debug("ec2 plugin: has_amazon_org? == true")
true
+ else
+ Ohai::Log.debug("ec2 plugin: has_amazon_org? == false")
+ false
end
rescue NoMethodError
Ohai::Log.debug("ec2 plugin: has_amazon_org? == false")