We are happy to announce the release of version 1.2.0 of the Chocolatey Ansible Collection!

Discussed below are the main changes included in this release but we also have a full set of release notes available.

Changes in win_chocolatey

Added state: upgrade Option

We have updated the documentation to clarify the behaviour of state: latest and state: present particularly when used with version:. We also added state: upgrade as an alias for the existing state: latest.

Note that using state: present in combination with version: will result in an error if a different version of the target package is already installed. If you want to upgrade packages, use state: latest or state: upgrade.

Example Usage

- name: upgrade choco
  win_chocolatey:
    state: upgrade
    name: chocolatey

Added choco_args: Option

We have added the ability to provide Chocolatey CLI arguments through the choco_args option. This allows you to provide additional parameters directly, including licensed arguments for Chocolatey For Business customers.

This option takes a list of parameters to pass to Chocolatey CLI, which will be added after any explicitly-set options in the Ansible task. This means that explicitly setting the version option, or any other options, will take precedence over anything provided in choco_args.

Example Usage

- name: install package with sensitive params
  no_log: true
  win_chocolatey:
    state: present
    name: package_name
    choco_args:
    - --package-parameters-sensitive
    - '/ConnectionString:"{{ my_connection_string }}"'

Release Notes

For more information on the breaking changes, features, improvements and bug fixes that were included in this release, please see the release notes.

Learn More


comments powered by Disqus