package_state_windows
This method manage packages using a chocolatey on the system.
⚙️ Compatible targets: Windows
Parameters
Name | Documentation |
---|---|
PackageName | Software name to install. This parameter is required. |
Status | 'present' or 'absent', defaults to 'present'. Choices:
This parameter is required. |
Provider | default to choco. Choices:
This parameter is optional. |
Params | params to pass to the package installation. This parameter is optional. |
Version | version, default to latest. This parameter is optional. |
Source | source. This parameter is optional. |
ProviderParams | provider parameters, default to choco. This parameter is optional. |
AutoUpgrade | autoUpgrade, default to false. Choices:
This parameter is optional. |
Outcome conditions
You need to replace ${PackageName}
with its actual canonified value.
- ✅ Ok:
package_state_windows_${PackageName}_ok
- ☑️ Already compliant:
package_state_windows_${PackageName}_kept
- 🟨 Repaired:
package_state_windows_${PackageName}_repaired
- ☑️ Already compliant:
- ❌ Error:
package_state_windows_${PackageName}_error
Example
method: package_state_windows
params:
PackageName: VALUE
Provider: choco
Params: OPTIONAL_VALUE
Source: OPTIONAL_VALUE
ProviderParams: OPTIONAL_VALUE
AutoUpgrade: 'true'
Version: OPTIONAL_VALUE
Status: present
Documentation
Install a windows package using a given provider
Parameters
Required args:
PackageName
Name of target packageStatus
can be "present" or "absent"
Optional args:
Provider
Provider used to installed the packageParams
Package parameters, passed to the installerVersion
can be "any", "latest" or any exact specific version numberSource
"any" or any specific archProviderParams
provider specific optionsAutoUpgrade
default set to false
Providers
choco
The method is a simple transcription of the cchoco cChocoPaclageInstaller
DSC resource, adapted to Rudder.
The DSC module cchoco
must be installed on your node before trying to use this method.
You can check the cchoco/chocolatey documentation to get more detailed information on the parameters. WARNING: If some exceptions are thrown about undefined env PATH variable after fresh cchoco lib in rudder, you may need to reboot your machine or notify your system that the env variables have been changed.