chocolatey.chocolatey.win_chocolatey_facts module – Create a facts collection for Chocolatey
Note
This module is part of the chocolatey.chocolatey collection (version 1.5.3).
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.
Parameters
Parameter |
Comments |
---|---|
If supplied, restrict the facts collected to the given subset. Possible values: You can provide a list of values to specify a larger subset. Choices:
Default: |
Notes
Note
Chocolatey must be installed beforehand, use chocolatey.chocolatey.win_chocolatey to do this.
See Also
See also
- chocolatey.chocolatey.win_chocolatey
Manage packages using chocolatey.
- chocolatey.chocolatey.win_chocolatey_config
Manages Chocolatey config settings.
- chocolatey.chocolatey.win_chocolatey_feature
Manages Chocolatey features.
- chocolatey.chocolatey.win_chocolatey_source
Manages Chocolatey sources.
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
- name: Gather all facts from chocolatey, except outdated packages
win_chocolatey_facts:
filter:
- 'config'
- 'feature'
- 'packages'
- 'sources'
- name: Displays the collected facts from chocolatey without the outdated packages
debug:
var: ansible_chocolatey
- name: Clear existing facts from chocolatey
ansible.builtin.meta: clear_facts
- name: Gather config and feature facts only from chocolatey
win_chocolatey_facts:
filter:
- 'config'
- 'feature'
- name: Displays the collected config and feature facts from chocolatey
debug:
var: ansible_chocolatey
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 |
---|---|
Detailed information about the Chocolatey installation Returned: always |
|
Detailed information about stored the configurations Returned: always (except when filter is set to exclude config) Sample: |
|
Detailed information about enabled and disabled features Returned: always (except when filter is set to exclude feature) Sample: |
|
The list of subsets that were gathered Returned: always Sample: |
|
List of packages for which an update is available Returned: always (except when filter is set to exclude outdated) |
|
Available version of the package Returned: always Sample: |
|
Current version of the package Returned: always Sample: |
|
Name of the package Returned: always Sample: |
|
Is the version of the package pinned to suppress upgrades Returned: always Sample: |
|
List of installed Packages Returned: always (except when filter is set to exclude packages) |
|
Name of the package Returned: always Sample: |
|
Version of the package Returned: always Sample: |
|
List of Chocolatey sources Returned: always (except when filter is set to exclude sources) |
|
Is the source visible to Administrators only Returned: always Sample: |
|
Is the source allowed to be used with self-service Returned: always Sample: |
|
Can the source explicitly bypass configured proxies Returned: always Sample: |
|
Pth to a PFX certificate for X509 authenticated feeds Returned: always Sample: |
|
Is the source disabled Returned: always Sample: |
|
Name of the source Returned: always Sample: |
|
The priority order of this source, lower is better, 0 is no priority Returned: always Sample: |
|
The source, can be a folder/file or an url Returned: always Sample: |
|
Username used to access authenticated feeds Returned: always Sample: |