ansible.builtin.win_chocolatey_facts (v2.9.27) — module

Create a facts collection for Chocolatey

| "added in version" 2.8 of ansible.builtin"

Authors: Simon Bärlocher (@sbaerlocher), ITIGO AG (@itigoag)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather facts from chocolatey
  win_chocolatey_facts:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Displays the Configuration
  debug:
    var: ansible_chocolatey.config
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Displays the Feature
  debug:
    var: ansible_chocolatey.feature
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Displays the Sources
  debug:
    var: ansible_chocolatey.sources
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Displays the Packages
  debug:
    var: ansible_chocolatey.packages

Outputs

ansible_facts:
  contains:
    ansible_chocolatey:
      contains:
        config:
          description: Detailed information about stored the configurations
          returned: always
          sample:
            commandExecutionTimeoutSeconds: 2700
            containsLegacyPackageInstalls: true
          type: dict
        feature:
          description: Detailed information about enabled and disabled features
          returned: always
          sample:
            allowEmptyCheckums: false
            autoUninstaller: true
            failOnAutoUninstaller: false
          type: dict
        packages:
          contains:
            package:
              description: Name of the package
              returned: always
              sample: vscode
              type: str
            version:
              description: Version of the package
              returned: always
              sample: 1.27.2
              type: str
          description: List of installed Packages
          returned: always
          type: complex
        sources:
          contains:
            admin_only:
              description: Is the source visible to Administrators only
              returned: always
              sample: false
              type: bool
            allow_self_service:
              description: Is the source allowed to be used with self-service
              returned: always
              sample: false
              type: bool
            bypass_proxy:
              description: Can the source explicitly bypass configured proxies
              returned: always
              sample: true
              type: bool
            certificate:
              description: Pth to a PFX certificate for X509 authenticated feeds
              returned: always
              sample: C:\chocolatey\cert.pfx
              type: str
            disabled:
              description: Is the source disabled
              returned: always
              sample: false
              type: bool
            name:
              description: Name of the source
              returned: always
              sample: chocolatey
              type: str
            priority:
              description: The priority order of this source, lower is better, 0 is
                no priority
              returned: always
              sample: 0
              type: int
            source:
              description: The source, can be a folder/file or an url
              returned: always
              sample: https://chocolatey.org/api/v2/
              type: str
            source_username:
              description: Username used to access authenticated feeds
              returned: always
              sample: username
              type: str
          description: List of Chocolatey sources
          returned: always
          type: complex
      description: Detailed information about the Chocolatey installation
      returned: always
      type: complex
  description: Detailed information about the Chocolatey installation
  returned: always
  type: complex

See also