summaryrefslogtreecommitdiff
path: root/lib/chef/platform.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/platform.rb')
-rw-r--r--lib/chef/platform.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/platform.rb b/lib/chef/platform.rb
index 807eeafa6d..6e6de6004e 100644
--- a/lib/chef/platform.rb
+++ b/lib/chef/platform.rb
@@ -476,6 +476,15 @@ class Chef
end
end
+ def windows_server_2003?
+ return false unless windows?
+
+ require 'ruby-wmi'
+
+ host = WMI::Win32_OperatingSystem.find(:first)
+ (host.version && host.version.start_with?("5.2"))
+ end
+
private
def explicit_provider(platform, version, resource_type)