Forge Home

wingetpkg

Type and Provider to install Software via Winget

487 downloads

228 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.2.1 (latest)
  • 1.2.0
  • 1.1.0
  • 1.0.1
  • 1.0.0
released May 31st 2023
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'voss2000-wingetpkg', '1.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add voss2000-wingetpkg
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install voss2000-wingetpkg --version 1.2.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

voss2000/wingetpkg — version 1.2.1 May 31st 2023

WinGet

This Module contains a Resource and Provider to install Software via Winget.

Usage

Simply use the Resource like this:

   wingetpkg {'Microsoft.PowerToys':
      ensure => present,
      version => 'latest',
   }

The title of the Resource is the id of the Winget package

Setup

Of course you will need Windows for that, and an installed and working Winget-Command. Maybe you can install it on older Versions, but Winget is includes in Windows since Windows 10 1709 (Build 16299). You can download and install it manually via [Github Releases]https://github.com/microsoft/winget-cli/releases).

Reference

Params:

The following Params exists:

ensure => :present, :installed, :absent version => or 'latest'

Optional:

fastupgrade => (default: 'yes') Use this Param with 'no' to turn of the Upgrade-Command of WinGet. This makes sence e.g. for the "Visual C Redistibutables", which creates dublicates on update, and confuses Winget. If this happens, please uninstall the doubled version manually, andd try it again. Also some Packages reports an incompatible installer for upgrade. With this Option you have a workaround.

   wingetpkg {'Microsoft.VCRedist.2013.x64':
      ensure => present,
      version => 'latest',
      fastupgrade: 'no'
   }

Limitations

Please keep in mind that winget is not really stable, but usable. I have seen a lot of problems related to winget when i have developed this Module.

misc

You have a little more insight how it works, if you use:

puppet resource wingetpkg

to view the currently detected packages, and of course:

puppet apply <manifest> --debug

to view some debug messages