chocolatey.chocolatey.win_chocolatey_facts module – Create a facts collection for Chocolatey

Note

This module is part of the chocolatey.chocolatey collection (version 1.3.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install chocolatey.chocolatey.

To use it in a playbook, specify: chocolatey.chocolatey.win_chocolatey_facts.

New in chocolatey.chocolatey 0.2.8

Synopsis

  • This module shows information from Chocolatey, such as installed packages, outdated packages, configuration, feature and sources.

Notes

Note

See Also

See also

chocolatey.chocolatey.win_chocolatey

The official documentation on the chocolatey.chocolatey.win_chocolatey module.

chocolatey.chocolatey.win_chocolatey_config

The official documentation on the chocolatey.chocolatey.win_chocolatey_config module.

chocolatey.chocolatey.win_chocolatey_feature

The official documentation on the chocolatey.chocolatey.win_chocolatey_feature module.

chocolatey.chocolatey.win_chocolatey_source

The official documentation on the chocolatey.chocolatey.win_chocolatey_source module.

Examples

- name: Gather facts from chocolatey
  win_chocolatey_facts:

- name: Displays the Configuration
  debug:
    var: ansible_chocolatey.config

- name: Displays the Feature
  debug:
    var: ansible_chocolatey.feature

- name: Displays the Sources
  debug:
    var: ansible_chocolatey.sources

- name: Displays the Packages
  debug:
    var: ansible_chocolatey.packages

- name: Displays the Outdated packages
  debug:
    var: ansible_chocolatey.outdated

Returned Facts

Facts returned by this module are added/updated in the hostvars host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

Key

Description

ansible_chocolatey

complex

Detailed information about the Chocolatey installation

Returned: always

config

dictionary

Detailed information about stored the configurations

Returned: always

Sample: {"commandExecutionTimeoutSeconds": 2700, "containsLegacyPackageInstalls": true}

feature

dictionary

Detailed information about enabled and disabled features

Returned: always

Sample: {"allowEmptyCheckums": false, "autoUninstaller": true, "failOnAutoUninstaller": false}

outdated

complex

added in chocolatey.chocolatey 1.3.0

List of packages for which an update is available

Returned: always

available_version

string

Available version of the package

Returned: always

Sample: "7.2.4"

current_version

string

Current version of the package

Returned: always

Sample: "7.2.3"

package

string

Name of the package

Returned: always

Sample: "vscodepowershell-core\","

pinned

boolean

Is the version of the package pinned to suppress upgrades

Returned: always

Sample: false

packages

complex

List of installed Packages

Returned: always

package

string

Name of the package

Returned: always

Sample: "vscode"

version

string

Version of the package

Returned: always

Sample: "1.27.2"

sources

complex

List of Chocolatey sources

Returned: always

admin_only

boolean

Is the source visible to Administrators only

Returned: always

Sample: false

allow_self_service

boolean

Is the source allowed to be used with self-service

Returned: always

Sample: false

bypass_proxy

boolean

Can the source explicitly bypass configured proxies

Returned: always

Sample: true

certificate

string

Pth to a PFX certificate for X509 authenticated feeds

Returned: always

Sample: "C:\\chocolatey\\cert.pfx"

disabled

boolean

Is the source disabled

Returned: always

Sample: false

name

string

Name of the source

Returned: always

Sample: "chocolatey"

priority

integer

The priority order of this source, lower is better, 0 is no priority

Returned: always

Sample: 0

source

string

The source, can be a folder/file or an url

Returned: always

Sample: "https://community.chocolatey.org/api/v2/"

source_username

string

Username used to access authenticated feeds

Returned: always

Sample: "username"

Authors

  • Simon Bärlocher (@sbaerlocher)

  • ITIGO AG (@itigoag)