ansible.windows.win_capability_info module – Get information about Windows capabilities
Note
This module is part of the ansible.windows collection (version 3.5.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install ansible.windows.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: ansible.windows.win_capability_info.
New in ansible.windows 3.6.0
Synopsis
Gather information about Windows capabilities.
A Windows capability is an optional feature that can be added to Windows.
Requirements
The below requirements are needed on the host that executes this module.
Windows Server 2019/Windows 10 build 1809 or newer for PowerShell 5.1
Windows Server 2022/Windows 10 build 1903 or newer for PowerShell 7.x
Parameters
Parameter |
Comments |
|---|---|
If Choices:
|
|
Sets the maximum output level for DISM logging.
This log is managed by DISM itself, the values allowed may change with different versions of Windows. |
|
Specifies the full path and file name to log to. If not specified the logging uses the default DISM log file location which is |
|
A list of capability names to filter by. Supports wildcard patterns like If not specified, all capabilities will be returned. |
|
Finds capabilities that are available in the specified source locations. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
|
Support: N/A |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platform: windows |
Target OS/families that can be operated against |
Notes
Note
This module does not support Server 2016.
See Also
See also
- ansible.windows.win_capability
Manage Windows capabilities.
Examples
- name: Get all capabilities
ansible.windows.win_capability_info:
register: capability_info
- name: Get specific capability using full name
ansible.windows.win_capability_info:
name: OpenSSH.Client~~~~0.0.1.0
register: ssh_client_info
- name: Get capabilities matching a pattern
ansible.windows.win_capability_info:
name:
- OpenSSH.*
- Language.Basic*
register: filtered_capabilities
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
A list of capabilities found. Returned: always |
|
The description of the capability. Returned: always Sample: |
|
The display name of the capability. Returned: always Sample: |
|
The download size of the capability in bytes. Returned: always Sample: |
|
The installation size of the capability in bytes. Returned: always Sample: |
|
The name of the capability. Returned: always Sample: |
|
The installation state of the capability. Known values are Returned: always Sample: |