community.windows
community.windows copied to clipboard
New win_capability module
SUMMARY
Would be nice if there was a module to configure (enable/disable) Windows Capabilities, similar to win_optional_feature module.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
I guess the new module's name would be win_capability
?
ADDITIONAL INFORMATION
The module would replicate the functionality of the cmdlets found via this query:
Get-Command -Module Dism -Noun WindowsCapability
It would allow people to enable, or disable Windows Capabilities, along with Optional Features and Features (on Servers).
Since Capabilities have version numbers in their names, we should be able to use wildcards or provide names partially.
Below is an example of how I would add RSAT Windows Capabilities with PowerShell and a mockup of an Ansible task where I would disable a couple of Capabilities that are enabled by default.
Get-WindowsCapability -Online -Name Rsat.* | Add-WindowsCapability -Online
- name: Disable unnecessary Windows Capabilities
community.windows.win_capability:
name: "{{ item }}"
state: absent
loop:
- 'XPS.Viewer'
- 'App.Support.QuickAssist'
- 'Browser.InternetExplorer'
In my opinion, this capability is needed to enable ssh server for windows!
Same here. I need it to install the OpenSSH.Server "optional feature".
+1 from me. Same use case as @smatterchew.
+1
+1
+1
please for the love of all things ansible
As per the README https://github.com/ansible-collections/community.windows#contributing-to-this-collection this collection is currently only accepting bugfixes or features to existing modules.
As this issue has been closed, can https://github.com/ansible-collections/ansible.windows/issues/96 be reopened?