Skip to content

Allow install resource to take an optional parameter to control the windows feature install method #476

@dave-q

Description

@dave-q

:person_frowning: Problem Statement

Using the IIS cookbook within my own cookbooks I would like to control the install method for any windows features that are installed by the IIS cookbook

❔ Possible Solution

The windows_feature resource already exposes this functionality https://docs.chef.io/resources/windows_feature/

install_method
Ruby Type: Symbol | Default Value: :windows_feature_dism
Allowed Values: :windows_feature_dism, :windows_feature_powershell, :windows_feature_servermanagercmd
The underlying installation method to use for feature installation. Specify :windows_feature_dism for DISM or :windows_feature_powershell for PowerShell.

I think it would be simple enough to expose a similar parameter on the install resource. It would be required false for backwards compatibility and to allow the windows_feature resource to take control of defaulting the value.

This can then be set in default.rb recipe from a node attribute, that way it can be controlled by downstream users of the cookbook.

I would suggest also exposed an optiona paramater on the manager.rb resource as this calls into the install resource

⤴️ Describe alternatives you've considered

I can't really think of any alternatives, currently there is no way of me controlling how the windows features in this cookbook are installed

➕ Additional context

We came across this issue as some of our infrastructure is running some chef recipes via a JEA profile, which is restricting the ability to run dism commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestEnhancement to existing functionality or new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions