Parameter |
Choices/Defaults |
Comments |
allow_empty_checksums
bool
(added in 2.2) |
|
Allow empty checksums to be used for downloaded resource from non-secure locations.
Use win_chocolatey_feature with the name allowEmptyChecksums to control this option globally.
|
allow_prerelease
bool
(added in 2.6) |
|
Allow the installation of pre-release packages.
If state is latest , the latest pre-release package will be installed.
|
architecture
(added in 2.7) |
|
Force Chocolatey to install the package of a specific process architecture.
When setting x86 , will ensure Chocolatey installs the x86 package even when on an x64 bit OS.
|
force
bool |
|
Forces the install of a package, even if it already is installed.
Using force will cause Ansible to always report that a change was made.
|
ignore_checksums
bool
(added in 2.2) |
|
Ignore the checksums provided by the package.
Use win_chocolatey_feature with the name checksumFiles to control this option globally.
|
ignore_dependencies
bool
(added in 2.1) |
|
Ignore dependencies, only install/upgrade the package itself.
|
install_args
str
(added in 2.1) |
|
Arguments to pass to the native installer.
These are arguments that are passed directly to the installer the Chocolatey package runs, this is generally an advanced option.
|
name
list
required |
|
Name of the package(s) to be installed.
Set to all to run the action on all the installed packages.
|
package_params
str
(added in 2.1) |
|
Parameters to pass to the package.
These are parameters specific to the Chocolatey package and are generally documented by the package itself.
Before Ansible 2.7, this option was just params.
aliases: params
|
proxy_password
str
(added in 2.4) |
|
Proxy password used to install Chocolatey and the package.
This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the password on the global config level with win_chocolatey_config with name proxyPassword to avoid this.
|
proxy_url
str
(added in 2.4) |
|
Proxy URL used to install chocolatey and the package.
Use win_chocolatey_config with the name proxy to control this option globally.
|
proxy_username
str
(added in 2.4) |
|
Proxy username used to install Chocolatey and the package.
Before Ansible 2.7, users with double quote characters " would need to be escaped with \ beforehand. This is no longer necessary.
Use win_chocolatey_config with the name proxyUser to control this option globally.
|
skip_scripts
bool
(added in 2.4) |
|
Do not run chocolateyInstall.ps1 or chocolateyUninstall.ps1 scripts when installing a package.
|
source
str |
|
Specify the source to retrieve the package from.
Use win_chocolatey_source to manage global sources.
This value can either be the URL to a Chocolatey feed, a path to a folder containing .nupkg packages or the name of a source defined by win_chocolatey_source.
This value is also used when Chocolatey is not installed as the location of the install.ps1 script and only supports URLs for this case.
|
source_password
str
(added in 2.7) |
|
The password for source_username.
This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the credentials with a source with win_chocolatey_source to avoid this.
|
source_username
str
(added in 2.7) |
|
A username to use with source when accessing a feed that requires authentication.
It is recommended you define the credentials on a source with win_chocolatey_source instead of passing it per task.
|
state
str |
Choices:
- absent
- downgrade
- latest
present ←
- reinstalled
|
State of the package on the system.
When absent , will ensure the package is not installed.
When present , will ensure the package is installed.
When downgrade , will allow Chocolatey to downgrade a package if version is older than the installed version.
When latest , will ensure the package is installed to the latest available version.
When reinstalled , will uninstall and reinstall the package.
|
timeout
int
(added in 2.3) |
Default:
2700
|
The time to allow chocolatey to finish before timing out.
aliases: execution_timeout
|
validate_certs
bool
(added in 2.7) |
|
Used when downloading the Chocolatey install script if Chocolatey is not already installed, this does not affect the Chocolatey package install process.
When no , no SSL certificates will be validated.
This should only be used on personally controlled sites using self-signed certificate.
|
version
str |
|
Specific version of the package to be installed.
Ignored when state is set to absent .
|