diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-03 09:19:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-03 09:19:35 -0700 |
commit | 96ac18a2cfa8616ae6d4fb1839554aff9ad2938a (patch) | |
tree | 730452543229c074031afa469421da11ca1c0fde | |
parent | 05cf05cb76ae22af9a8466e0226d0092b74c8414 (diff) | |
parent | a6bc18d974623dace652044df7796a4c52ff5107 (diff) | |
download | ohai-96ac18a2cfa8616ae6d4fb1839554aff9ad2938a.tar.gz |
Merge pull request #971 from chef/lcg/amazon-platform-family
add amazon platform_family
-rw-r--r-- | lib/ohai/plugins/linux/platform.rb | 6 | ||||
-rw-r--r-- | spec/unit/plugins/linux/platform_spec.rb | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb index 7fdabbe2..fc9215c4 100644 --- a/lib/ohai/plugins/linux/platform.rb +++ b/lib/ohai/plugins/linux/platform.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright (c) 2015-2016 Chef Software, Inc. +# Copyright:: Copyright (c) 2015-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -107,8 +107,10 @@ Ohai.plugin(:Platform) do case platform when /debian/, /ubuntu/, /linuxmint/, /raspbian/, /cumulus/ "debian" - when /oracle/, /centos/, /redhat/, /scientific/, /enterpriseenterprise/, /amazon/, /xenserver/, /cloudlinux/, /ibm_powerkvm/, /parallels/, /nexus_centos/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID" + when /oracle/, /centos/, /redhat/, /scientific/, /enterpriseenterprise/, /xenserver/, /cloudlinux/, /ibm_powerkvm/, /parallels/, /nexus_centos/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID" "rhel" + when /amazon/ + "amazon" when /suse/ "suse" when /fedora/, /pidora/, /arista_eos/ diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb index 5066d209..1cd544ca 100644 --- a/spec/unit/plugins/linux/platform_spec.rb +++ b/spec/unit/plugins/linux/platform_spec.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc. +# Copyright:: Copyright (c) 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -113,7 +113,7 @@ describe Ohai::System, "Linux plugin platform" do @plugin[:lsb][:release] = "2011.09" @plugin.run expect(@plugin[:platform]).to eq("amazon") - expect(@plugin[:platform_family]).to eq("rhel") + expect(@plugin[:platform_family]).to eq("amazon") end it "should set platform to scientific when [:lsb][:id] contains ScientificSL" do @@ -358,7 +358,7 @@ OS_RELEASE it "should set the platform_family to rhel if the LSB name is amazon-ish" do @plugin[:lsb][:id] = "Amazon" @plugin.run - expect(@plugin[:platform_family]).to eq("rhel") + expect(@plugin[:platform_family]).to eq("amazon") end it "should set the platform_family to fedora if the LSB name is fedora-ish" do |