Class: PuppetX::PuppetLabs::IIS::IISVersion
- Inherits:
-
Object
- Object
- PuppetX::PuppetLabs::IIS::IISVersion
- Defined in:
- lib/puppet_x/puppetlabs/iis/iis_version.rb,
lib/puppet_x/puppetlabs/iis/iis_version.rb
Overview
IISVersion
Class Method Summary collapse
-
.installed_version ⇒ Object
get iis installed_version.
-
.supported_version_installed? ⇒ Boolean
verify if iis supported version is installed.
-
.supported_versions ⇒ Object
define iis supported_versions.
Class Method Details
.installed_version ⇒ Object
get iis installed_version
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/puppet_x/puppetlabs/iis/iis_version.rb', line 35 def self.installed_version version = nil begin hklm = Win32::Registry::HKEY_LOCAL_MACHINE reg_path = 'SOFTWARE\Microsoft\InetStp' access_type = Win32::Registry::KEY_READ | 0x100 major_version = '' minor_version = '' hklm.open(reg_path, access_type) do |reg| major_version = reg['MajorVersion'] minor_version = reg['MinorVersion'] end version = "#{major_version}.#{minor_version}" rescue StandardError version = nil end version end |
.supported_version_installed? ⇒ Boolean
verify if iis supported version is installed
58 59 60 |
# File 'lib/puppet_x/puppetlabs/iis/iis_version.rb', line 58 def self.supported_version_installed? false end |
.supported_versions ⇒ Object
define iis supported_versions
30 31 32 |
# File 'lib/puppet_x/puppetlabs/iis/iis_version.rb', line 30 def self.supported_versions ['7.5', '8.0', '8.5', '10.0'] end |