community.windows.win_feature_info – Gather information about Windows features

Note

This plugin is part of the community.windows collection (version 1.6.0).

To install it use: ansible-galaxy collection install community.windows.

To use it in a playbook, specify: community.windows.win_feature_info.

New in version 1.4.0: of community.windows

Synopsis

  • Gather information about all or a specific installed Windows feature(s).

Parameters

Parameter Choices/Defaults Comments
name
string
Default:
"*"
If specified, this is used to match the name of the Windows feature to get the info for.
Can be a wildcard to match multiple features but the wildcard will only be matched on the name of the feature.
If omitted then all features will returned.

See Also

See also

ansible.windows.win_feature

The official documentation on the ansible.windows.win_feature module.

Examples

- name: Get info for all installed features
  community.windows.win_feature_info:
  register: feature_info
- name: Get info for a single feature
  community.windows.win_feature_info:
    name: DNS
  register: feature_info
- name: Find all features that start with 'FS'
  ansible.windows.win_feature_info:
    name: FS*

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
exists
boolean
always
Whether any features were found based on the criteria specified.

Sample:
True
features
list / elements=dictionary
always
A list of feature(s) that were found based on the criteria.
Will be an empty list if no features were found.

 
additional_info
dictionary
success
A list of privileges that the feature requires and will run with

   
install_name
string
success
The action to perform once triggered, can be start_feature or stop_feature.

Sample:
ADCertificateServicesRole
   
major_version
integer
success
Major Version of feature name.

Sample:
8
   
minor_version
integer
success
Minor Version of feature name.

   
number_id_version
integer
success
Numberic Id of feature name.

Sample:
16
 
best_practices_model_id
string
success
BestPracticesModelId for feature name.

Sample:
Microsoft/Windows/UpdateServices
 
depends_on
list / elements=string
success
The command line that will be run when a run_command failure action is fired.

Sample:
['Web-Static-Content', 'Web-Default-Doc']
 
depth
integer
success
Depth of name feature.

Sample:
1
 
description
string
success
The description of the feature.

Sample:
Example description of the Windows feature.
 
display_name
string
success
The Display name of feature found.

Sample:
Active Directory Certificate Services
 
event_query
string
success
The EventQuery for feature name.
This will be null if None Present

Sample:
IPAMServer.Events.xml
 
feature_type
string
success
The Feature Type of name.
Values will be one of Role, Role Service, Feature.

Sample:
Feature
 
install_state
string
success
The Install State of name.
Values will be one of Available, Removed, Installed.

Sample:
Installed
 
installed
boolean
success
Whether the feature by name is installed.

 
name
string
success
Name of feature found.

Sample:
AD-Certificate
 
parent
string
success
The parent of feature name if present.

Sample:
PowerShellRoot
 
path
string
success
The Path of name feature.

Sample:
WoW64 Support
 
post_configuration_needed
boolean
success
Tells if Post Configuration is needed for feature name.

 
server_component_descriptor
string
success
Descriptor of name feature.

Sample:
ServerComponent_AD_Certificate
 
sub_features
list / elements=string
success
List of sub features names of feature name.

Sample:
['WAS-Process-Model', 'WAS-NET-Environment', 'WAS-Config-APIs']
 
system_service
list / elements=string
success
The name of the service installed by feature name.

Sample:
['iisadmin', 'w3svc']


Authors

  • Larry Lane (@gamethis)