summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-04-03 13:57:59 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-04-03 13:57:59 -0700
commite9e9fe8711248fc9748fd3b633b7418eb8cd0ed1 (patch)
tree0df59b5cd10b5eaf4b41cef2f6e91b7880c2e563
parentb96431d882d95ea758dba5976623f764e769683f (diff)
downloadchef-e9e9fe8711248fc9748fd3b633b7418eb8cd0ed1.tar.gz
chef code changes for changing amazon platform_family
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/provider/ifconfig/redhat.rb2
-rw-r--r--lib/chef/provider/package/dnf.rb2
-rw-r--r--lib/chef/provider/package/yum.rb4
-rw-r--r--lib/chef/provider/service.rb2
-rw-r--r--lib/chef/provider/service/insserv.rb4
-rw-r--r--lib/chef/provider/service/redhat.rb4
-rw-r--r--lib/chef/resource/dnf_package.rb2
-rw-r--r--lib/chef/resource/yum_package.rb2
8 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/provider/ifconfig/redhat.rb b/lib/chef/provider/ifconfig/redhat.rb
index 841e725b94..8af9f10f67 100644
--- a/lib/chef/provider/ifconfig/redhat.rb
+++ b/lib/chef/provider/ifconfig/redhat.rb
@@ -22,7 +22,7 @@ class Chef
class Provider
class Ifconfig
class Redhat < Chef::Provider::Ifconfig
- provides :ifconfig, platform_family: %w{fedora rhel}
+ provides :ifconfig, platform_family: %w{fedora rhel amazon}
def initialize(new_resource, run_context)
super(new_resource, run_context)
diff --git a/lib/chef/provider/package/dnf.rb b/lib/chef/provider/package/dnf.rb
index c551ae7cb0..42d679c940 100644
--- a/lib/chef/provider/package/dnf.rb
+++ b/lib/chef/provider/package/dnf.rb
@@ -35,7 +35,7 @@ class Chef
use_multipackage_api
use_package_name_for_source
- provides :package, platform_family: %w{rhel fedora} do
+ provides :package, platform_family: %w{rhel fedora amazon} do
which("dnf") && shell_out("rpm -q dnf").stdout =~ /^dnf-[1-9]/
end
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb
index d37aa1fb73..f1ba9dd4eb 100644
--- a/lib/chef/provider/package/yum.rb
+++ b/lib/chef/provider/package/yum.rb
@@ -1,6 +1,6 @@
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2008-2017, Chef Software, Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,7 +29,7 @@ class Chef
class Yum < Chef::Provider::Package
include Chef::Mixin::GetSourceFromPackage
- provides :package, platform_family: %w{rhel fedora}
+ provides :package, platform_family: %w{rhel fedora amazon}
provides :yum_package, os: "linux"
# Multipackage API
diff --git a/lib/chef/provider/service.rb b/lib/chef/provider/service.rb
index 9f06e2eb25..34ecf2f0bc 100644
--- a/lib/chef/provider/service.rb
+++ b/lib/chef/provider/service.rb
@@ -245,7 +245,7 @@ class Chef
Chef.set_provider_priority_array :service, [ Systemd, Arch ], platform_family: "arch"
Chef.set_provider_priority_array :service, [ Systemd, Gentoo ], platform_family: "gentoo"
Chef.set_provider_priority_array :service, [ Systemd, Upstart, Insserv, Debian, Invokercd ], platform_family: "debian"
- Chef.set_provider_priority_array :service, [ Systemd, Insserv, Redhat ], platform_family: %w{rhel fedora suse}
+ Chef.set_provider_priority_array :service, [ Systemd, Insserv, Redhat ], platform_family: %w{rhel fedora suse amazon}
end
end
end
diff --git a/lib/chef/provider/service/insserv.rb b/lib/chef/provider/service/insserv.rb
index c3dca10495..a8e841f8b3 100644
--- a/lib/chef/provider/service/insserv.rb
+++ b/lib/chef/provider/service/insserv.rb
@@ -1,6 +1,6 @@
#
# Author:: Bryan McLellan <btm@loftninjas.org>
-# Copyright:: Copyright 2011-2016, Chef Software Inc.
+# Copyright:: Copyright 2011-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,7 +24,7 @@ class Chef
class Service
class Insserv < Chef::Provider::Service::Init
- provides :service, platform_family: %w{debian rhel fedora suse} do |node|
+ provides :service, platform_family: %w{debian rhel fedora suse amazon} do |node|
Chef::Platform::ServiceHelpers.service_resource_providers.include?(:insserv)
end
diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb
index 21ab678706..1da3d7c01a 100644
--- a/lib/chef/provider/service/redhat.rb
+++ b/lib/chef/provider/service/redhat.rb
@@ -1,6 +1,6 @@
#
# Author:: AJ Christensen (<aj@hjksolutions.com>)
-# Copyright:: Copyright 2008-2016, Chef Software, Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,7 +28,7 @@ class Chef
# @api private
attr_accessor :current_run_levels
- provides :service, platform_family: %w{rhel fedora suse} do |node|
+ provides :service, platform_family: %w{rhel fedora suse amazon} do |node|
Chef::Platform::ServiceHelpers.service_resource_providers.include?(:redhat)
end
diff --git a/lib/chef/resource/dnf_package.rb b/lib/chef/resource/dnf_package.rb
index f10c282f19..d92dc12ec7 100644
--- a/lib/chef/resource/dnf_package.rb
+++ b/lib/chef/resource/dnf_package.rb
@@ -29,7 +29,7 @@ class Chef
allowed_actions :install, :upgrade, :remove, :purge, :reconfig, :lock, :unlock, :flush_cache
- provides :package, platform_family: %w{rhel fedora} do
+ provides :package, platform_family: %w{rhel fedora amazon} do
which("dnf") && shell_out("rpm -q dnf").stdout =~ /^dnf-[1-9]/
end
diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb
index 2fc5db5cc3..078725e306 100644
--- a/lib/chef/resource/yum_package.rb
+++ b/lib/chef/resource/yum_package.rb
@@ -22,7 +22,7 @@ class Chef
class Resource
class YumPackage < Chef::Resource::Package
resource_name :yum_package
- provides :package, os: "linux", platform_family: %w{rhel fedora}
+ provides :package, os: "linux", platform_family: %w{rhel fedora amazon}
# XXX: the coercions here are due to the provider promiscuously updating the properties on the
# new_resource which causes immutable modification exceptions when passed an immutable node array.