diff options
Diffstat (limited to 'lib/chef/provider')
24 files changed, 26 insertions, 27 deletions
diff --git a/lib/chef/provider/batch.rb b/lib/chef/provider/batch.rb index 83218e4f76..dae1513a51 100644 --- a/lib/chef/provider/batch.rb +++ b/lib/chef/provider/batch.rb @@ -22,7 +22,7 @@ class Chef class Provider class Batch < Chef::Provider::WindowsScript - provides :batch, os: "windows" + provides :batch def initialize(new_resource, run_context) super(new_resource, run_context, ".bat") diff --git a/lib/chef/provider/dsc_resource.rb b/lib/chef/provider/dsc_resource.rb index 959227b408..f16c91640b 100644 --- a/lib/chef/provider/dsc_resource.rb +++ b/lib/chef/provider/dsc_resource.rb @@ -24,7 +24,7 @@ class Chef class Provider class DscResource < Chef::Provider include Chef::Mixin::PowershellTypeCoercions - provides :dsc_resource, os: "windows" + provides :dsc_resource def initialize(new_resource, run_context) super @new_resource = new_resource diff --git a/lib/chef/provider/dsc_script.rb b/lib/chef/provider/dsc_script.rb index db7a5442ed..b568a3bab9 100644 --- a/lib/chef/provider/dsc_script.rb +++ b/lib/chef/provider/dsc_script.rb @@ -25,7 +25,7 @@ class Chef class Provider class DscScript < Chef::Provider - provides :dsc_script, os: "windows" + provides :dsc_script def initialize(dsc_resource, run_context) super(dsc_resource, run_context) diff --git a/lib/chef/provider/ifconfig/aix.rb b/lib/chef/provider/ifconfig/aix.rb index 788b609fcf..b68c5d5364 100644 --- a/lib/chef/provider/ifconfig/aix.rb +++ b/lib/chef/provider/ifconfig/aix.rb @@ -22,7 +22,7 @@ class Chef class Provider class Ifconfig class Aix < Chef::Provider::Ifconfig - provides :ifconfig, platform: %w{aix} + provides :ifconfig, platform: "aix" def load_current_resource @current_resource = Chef::Resource::Ifconfig.new(new_resource.name) diff --git a/lib/chef/provider/mount/aix.rb b/lib/chef/provider/mount/aix.rb index 6f38edeb44..240b71f747 100644 --- a/lib/chef/provider/mount/aix.rb +++ b/lib/chef/provider/mount/aix.rb @@ -21,7 +21,7 @@ class Chef class Provider class Mount class Aix < Chef::Provider::Mount::Mount - provides :mount, platform: %w{aix} + provides :mount, platform: "aix" # Override for aix specific handling def initialize(new_resource, run_context) diff --git a/lib/chef/provider/osx_profile.rb b/lib/chef/provider/osx_profile.rb index 1d87f29eb2..326534c4bd 100644 --- a/lib/chef/provider/osx_profile.rb +++ b/lib/chef/provider/osx_profile.rb @@ -25,8 +25,8 @@ require "uuidtools" class Chef class Provider class OsxProfile < Chef::Provider - provides :osx_profile, os: "darwin" - provides :osx_config_profile, os: "darwin" + provides :osx_profile + provides :osx_config_profile def load_current_resource @current_resource = Chef::Resource::OsxProfile.new(new_resource.name) diff --git a/lib/chef/provider/package/apt.rb b/lib/chef/provider/package/apt.rb index d307ba5003..38dd7398c9 100644 --- a/lib/chef/provider/package/apt.rb +++ b/lib/chef/provider/package/apt.rb @@ -26,7 +26,7 @@ class Chef use_multipackage_api provides :package, platform_family: "debian" - provides :apt_package, os: "linux" + provides :apt_package def initialize(new_resource, run_context) super diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb index 2932654962..a6abdd5b46 100644 --- a/lib/chef/provider/package/chocolatey.rb +++ b/lib/chef/provider/package/chocolatey.rb @@ -25,7 +25,7 @@ class Chef class Chocolatey < Chef::Provider::Package include Chef::Mixin::PowershellOut - provides :chocolatey_package, os: "windows" + provides :chocolatey_package # Declare that our arguments should be arrays use_multipackage_api diff --git a/lib/chef/provider/package/dpkg.rb b/lib/chef/provider/package/dpkg.rb index cf92e6d3e7..cc79f9fc3a 100644 --- a/lib/chef/provider/package/dpkg.rb +++ b/lib/chef/provider/package/dpkg.rb @@ -27,7 +27,7 @@ class Chef DPKG_INSTALLED = /^Status: install ok installed/ DPKG_VERSION = /^Version: (.+)$/ - provides :dpkg_package, os: "linux" + provides :dpkg_package use_multipackage_api use_package_name_for_source diff --git a/lib/chef/provider/package/ips.rb b/lib/chef/provider/package/ips.rb index d0c8bed175..255a4a2508 100644 --- a/lib/chef/provider/package/ips.rb +++ b/lib/chef/provider/package/ips.rb @@ -27,7 +27,7 @@ class Chef class Ips < Chef::Provider::Package provides :package, platform: %w{openindiana opensolaris omnios solaris2} - provides :ips_package, os: "solaris2" + provides :ips_package attr_accessor :virtual diff --git a/lib/chef/provider/package/msu.rb b/lib/chef/provider/package/msu.rb index 5c398149ba..8e00a10169 100644 --- a/lib/chef/provider/package/msu.rb +++ b/lib/chef/provider/package/msu.rb @@ -36,7 +36,7 @@ class Chef include Chef::Mixin::Uris include Chef::Mixin::Checksum - provides :msu_package, os: "windows" + provides :msu_package def load_current_resource @current_resource = Chef::Resource::MsuPackage.new(new_resource.name) diff --git a/lib/chef/provider/package/pacman.rb b/lib/chef/provider/package/pacman.rb index d1830bdefa..62460d6869 100644 --- a/lib/chef/provider/package/pacman.rb +++ b/lib/chef/provider/package/pacman.rb @@ -25,7 +25,7 @@ class Chef class Pacman < Chef::Provider::Package provides :package, platform: "arch" - provides :pacman_package, os: "linux" + provides :pacman_package def load_current_resource @current_resource = Chef::Resource::Package.new(new_resource.name) diff --git a/lib/chef/provider/package/paludis.rb b/lib/chef/provider/package/paludis.rb index 0b57d05adf..092c7a0d00 100644 --- a/lib/chef/provider/package/paludis.rb +++ b/lib/chef/provider/package/paludis.rb @@ -25,7 +25,7 @@ class Chef class Paludis < Chef::Provider::Package provides :package, platform: "exherbo" - provides :paludis_package, os: "linux" + provides :paludis_package def load_current_resource @current_resource = Chef::Resource::Package.new(new_resource.package_name) diff --git a/lib/chef/provider/package/powershell.rb b/lib/chef/provider/package/powershell.rb index f553aada0a..02ae114f55 100644 --- a/lib/chef/provider/package/powershell.rb +++ b/lib/chef/provider/package/powershell.rb @@ -25,7 +25,7 @@ class Chef class Powershell < Chef::Provider::Package include Chef::Mixin::PowershellOut - provides :powershell_package, os: "windows" + provides :powershell_package def load_current_resource @current_resource = Chef::Resource::PowershellPackage.new(new_resource.name) diff --git a/lib/chef/provider/package/rpm.rb b/lib/chef/provider/package/rpm.rb index 07617c814e..d3f9b2f5f0 100644 --- a/lib/chef/provider/package/rpm.rb +++ b/lib/chef/provider/package/rpm.rb @@ -24,8 +24,7 @@ class Chef class Provider class Package class Rpm < Chef::Provider::Package - - provides :rpm_package, os: %w{linux aix} + provides :rpm_package include Chef::Mixin::GetSourceFromPackage diff --git a/lib/chef/provider/package/smartos.rb b/lib/chef/provider/package/smartos.rb index 66d23554df..f18dc1e1e5 100644 --- a/lib/chef/provider/package/smartos.rb +++ b/lib/chef/provider/package/smartos.rb @@ -30,7 +30,7 @@ class Chef attr_accessor :is_virtual_package provides :package, platform: "smartos" - provides :smartos_package, platform_family: "smartos" + provides :smartos_package def load_current_resource Chef::Log.debug("#{new_resource} loading current resource") diff --git a/lib/chef/provider/package/solaris.rb b/lib/chef/provider/package/solaris.rb index f6e66c050a..86197023e0 100644 --- a/lib/chef/provider/package/solaris.rb +++ b/lib/chef/provider/package/solaris.rb @@ -28,7 +28,7 @@ class Chef provides :package, platform: "nexentacore" provides :package, platform: "solaris2", platform_version: "< 5.11" - provides :solaris_package, os: "solaris2" + provides :solaris_package # def initialize(*args) # super diff --git a/lib/chef/provider/package/zypper.rb b/lib/chef/provider/package/zypper.rb index 05e6dbd8fc..f12fa270ac 100644 --- a/lib/chef/provider/package/zypper.rb +++ b/lib/chef/provider/package/zypper.rb @@ -29,7 +29,7 @@ class Chef use_multipackage_api provides :package, platform_family: "suse" - provides :zypper_package, os: "linux" + provides :zypper_package def get_versions(package_name) candidate_version = current_version = nil diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb index 87705ef59a..ae14738bdf 100644 --- a/lib/chef/provider/powershell_script.rb +++ b/lib/chef/provider/powershell_script.rb @@ -23,7 +23,7 @@ class Chef class Provider class PowershellScript < Chef::Provider::WindowsScript - provides :powershell_script, os: "windows" + provides :powershell_script def initialize(new_resource, run_context) super(new_resource, run_context, ".ps1") diff --git a/lib/chef/provider/service/macosx.rb b/lib/chef/provider/service/macosx.rb index 9dc7b81a29..a0ae03a717 100644 --- a/lib/chef/provider/service/macosx.rb +++ b/lib/chef/provider/service/macosx.rb @@ -28,7 +28,7 @@ class Chef class Service class Macosx < Chef::Provider::Service::Simple - provides :macosx_service, os: "darwin" + provides :macosx_service provides :service, os: "darwin" def self.gather_plist_dirs diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index d370ecff51..ce84f7c4ee 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -27,7 +27,7 @@ end class Chef::Provider::Service::Windows < Chef::Provider::Service provides :service, os: "windows" - provides :windows_service, os: "windows" + provides :windows_service include Chef::Mixin::ShellOut include Chef::ReservedNames::Win32::API::Error rescue LoadError diff --git a/lib/chef/provider/systemd_unit.rb b/lib/chef/provider/systemd_unit.rb index 420438775c..18ea8ea92c 100644 --- a/lib/chef/provider/systemd_unit.rb +++ b/lib/chef/provider/systemd_unit.rb @@ -30,7 +30,7 @@ class Chef include Chef::Mixin::Which include Chef::Mixin::ShellOut - provides :systemd_unit, os: "linux" + provides :systemd_unit def load_current_resource @current_resource = Chef::Resource::SystemdUnit.new(new_resource.name) diff --git a/lib/chef/provider/windows_env.rb b/lib/chef/provider/windows_env.rb index b5b06666f3..085783d750 100644 --- a/lib/chef/provider/windows_env.rb +++ b/lib/chef/provider/windows_env.rb @@ -26,8 +26,8 @@ class Chef include Chef::Mixin::WindowsEnvHelper attr_accessor :key_exists - provides :env, os: "windows" - provides :windows_env, os: "windows" + provides :env + provides :windows_env def whyrun_supported? false diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index d8754e7d5d..c52d520373 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -27,7 +27,7 @@ class Chef include Chef::Mixin::ShellOut include Chef::Mixin::PowershellOut - provides :windows_task, os: "windows" + provides :windows_task def load_current_resource self.current_resource = Chef::Resource::WindowsTask.new(new_resource.name) |