diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-03 13:57:59 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-03 13:57:59 -0700 |
commit | e9e9fe8711248fc9748fd3b633b7418eb8cd0ed1 (patch) | |
tree | 0df59b5cd10b5eaf4b41cef2f6e91b7880c2e563 /lib/chef/provider | |
parent | b96431d882d95ea758dba5976623f764e769683f (diff) | |
download | chef-e9e9fe8711248fc9748fd3b633b7418eb8cd0ed1.tar.gz |
chef code changes for changing amazon platform_family
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/ifconfig/redhat.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/dnf.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/yum.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service/insserv.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 4 |
6 files changed, 9 insertions, 9 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 |