summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-04-01 22:32:47 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-04-01 22:32:47 -0700
commita6bc18d974623dace652044df7796a4c52ff5107 (patch)
tree730452543229c074031afa469421da11ca1c0fde
parent05cf05cb76ae22af9a8466e0226d0092b74c8414 (diff)
downloadohai-a6bc18d974623dace652044df7796a4c52ff5107.tar.gz
add amazon platform_familylcg/amazon-platform-family
i think we've finally decided not to move amazon to fedora in #960 i still think everyone is wrong, but i got my `fedora_derived?` chef-sugar helper so its a mute point now... https://github.com/chef/chef-rfc/pull/252 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/ohai/plugins/linux/platform.rb6
-rw-r--r--spec/unit/plugins/linux/platform_spec.rb6
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