lib/ohai/plugins/ec2.rb in ohai-13.1.0 vs lib/ohai/plugins/ec2.rb in ohai-13.2.0

- old
+ new

@@ -41,14 +41,14 @@ # this gets us detection of HVM instances that are within a VPC def has_ec2_dmi? # detect a version of '4.2.amazon' if get_attribute(:dmi, :bios, :all_records, 0, :Version) =~ /amazon/ Ohai::Log.debug("Plugin EC2: has_ec2_dmi? == true") - return true + true else Ohai::Log.debug("Plugin EC2: has_ec2_dmi? == false") - return false + false end end # looks for a xen UUID that starts with ec2 # this gets us detection of Linux HVM and Paravirt hosts @@ -58,22 +58,22 @@ Ohai::Log.debug("Plugin EC2: has_ec2_xen_uuid? == true") return true end end Ohai::Log.debug("Plugin EC2: has_ec2_xen_uuid? == false") - return false + false end # looks for the Amazon.com Organization in Windows Kernel data # this gets us detection of Windows systems def has_amazon_org? # detect an Organization of 'Amazon.com' if get_attribute(:kernel, :os_info, :organization) =~ /Amazon/ Ohai::Log.debug("Plugin EC2: has_amazon_org? == true") - return true + true else Ohai::Log.debug("Plugin EC2: has_amazon_org? == false") - return false + false end end def looks_like_ec2? return true if hint?("ec2")