windows_feature
Experimental. A Windows Server role or feature. It never reboots: reboot_required says whether Windows wants one, and windows_reboot does it.
Experimental. Windows support is new, and this module may change between releases.
Use windows_feature to install or remove a Windows Server role or feature. It never reboots a host. When Windows wants one, reboot_required says so, and a windows_reboot step does it, so the reboot shows in the plan.
Example usage
Section titled “Example usage”step "iis" { windows_feature { name = "Web-Server" include_management_tools = true }}step "restart_if_needed" { windows_reboot { only_if_pending = true }}step "no_smb1" { windows_feature { name = "FS-SMB1" state = "absent" }}Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
include_management_tools |
bool | No | Also install its management tools. |
include_sub_features |
bool | No | Also install everything under it. |
name |
string | Yes | Feature name, such as Web-Server. |
state |
string | No | “present” (default) or “absent”. |
timeout |
string | No | How long to allow. Defaults to “30m”. |
Read-only attributes
Section titled “Read-only attributes”Conn3x sets these; reference them as conn3x_windows_feature.<circuit>__<step>["<host>"].<name>.
| Name | Type | Description |
|---|---|---|
in_sync |
bool | Whether the feature matched at the last refresh. |
reboot_required |
bool | Whether Windows reported wanting a reboot after the last change. |
revision |
string | Changes each time Conn3x changes this on the host. Handlers watch it. |
A step lowers to the conn3x_windows_feature resource, one instance per host, and connects with its circuit’s ssh block.
How it works
Section titled “How it works”Features install one at a time per host. An install can take several minutes, and timeout defaults to "30m".
Windows Server only: Windows client has no such feature list. An InstallPending feature counts as installed, and shows reboot_required.
Removal
Section titled “Removal”Deleting a windows_feature step leaves the feature as it is. Use state = "absent" to remove one.