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

Note

This plugin is part of the chocolatey.chocolatey collection.

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

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

New in version 2.8: of chocolatey.chocolatey

Synopsis

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

Notes

Note

  • Chocolatey must be installed beforehand, use win_chocolatey to do this.

See Also

See also

win_chocolatey

The official documentation on the win_chocolatey module.

win_chocolatey_config

The official documentation on the win_chocolatey_config module.

win_chocolatey_feature

The official documentation on the win_chocolatey_feature module.

win_chocolatey_source

The official documentation on the 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

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.

Fact Returned Description
ansible_chocolatey
complex / elements=string
always
Detailed information about the Chocolatey installation

config
dictionary / elements=string
always
Detailed information about stored the configurations

Sample:
{'commandExecutionTimeoutSeconds': 2700, 'containsLegacyPackageInstalls': True}
feature
dictionary / elements=string
always
Detailed information about enabled and disabled features

Sample:
{'allowEmptyCheckums': False, 'autoUninstaller': True, 'failOnAutoUninstaller': False}
packages
complex / elements=string
always
List of installed Packages

package
string / elements=string
always
Name of the package

Sample:
vscode
version
string / elements=string
always
Version of the package

Sample:
1.27.2
sources
complex / elements=string
always
List of Chocolatey sources

admin_only
boolean / elements=string
always
Is the source visible to Administrators only

allow_self_service
boolean / elements=string
always
Is the source allowed to be used with self-service

bypass_proxy
boolean / elements=string
always
Can the source explicitly bypass configured proxies

Sample:
True
certificate
string / elements=string
always
Pth to a PFX certificate for X509 authenticated feeds

Sample:
C:\chocolatey\cert.pfx
disabled
boolean / elements=string
always
Is the source disabled

name
string / elements=string
always
Name of the source

Sample:
chocolatey
priority
integer / elements=string
always
The priority order of this source, lower is better, 0 is no priority

source
string / elements=string
always
The source, can be a folder/file or an url

Sample:
https://chocolatey.org/api/v2/
source_username
string / elements=string
always
Username used to access authenticated feeds

Sample:
username


Authors

  • Simon Bärlocher (@sbaerlocher)

  • ITIGO AG (@itigoag)