class RuboCop::Cop::Chef::Deprecations::WindowsFeatureServermanagercmd
The ‘windows_feature` resource no longer supports setting the `install_method` to `:servermanagercmd`. `:windows_feature_dism` or `:windows_feature_powershell` should be used instead.
@example
#### incorrect windows_feature 'DHCP' do install_method :servermanagercmd end #### correct windows_feature 'DHCP' do install_method :windows_feature_dism end windows_feature 'DHCP' do install_method :windows_feature_powershell end windows_feature_dism 'DHCP' windows_feature_powershell 'DHCP'
Constants
- MSG
Public Instance Methods
on_block(node)
click to toggle source
# File lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb, line 49 def on_block(node) match_property_in_resource?(:windows_feature, :install_method, node) do |prop_node| add_offense(prop_node, severity: :warning) if prop_node.source.include?(':servermanagercmd') end end