Automatically Install a List of Software to Windows – Chocolatey Puppet Provider

Install Windows programs just by listing them:

package {["gedit", "firefox", "skype", "vlc"]:}

Puppet can manage Windows slaves. Choco is a limited package manager for Windows. This article shows how to use Choco from Puppet.
Package managers are like calendars. The more you have, the worse off you are. – Me.
Prequisites: command line basics, agent-master puppet, Windows as Puppet Slave
This article is written from memory.
Choco is no apt-get. It’s nice, but if you want a real package manager you should use Linux.

Install puppetlabs/windows Modules

On the Linux Puppetmaster

sudo puppet module install puppetlabs/windows

This installs chocolatey package provider and many other packages for Windows. They are installed into your /etc/puppet/modules/.

Write Module to Install A List of Programs

$ cat gedit/manifests/init.pp
class gedit {
   include chocolatey
   Package {
       ensure => "installed",
       provider => "chocolatey",
   package {["gedit", "googlechrome", "flashplayerplugin", "firefox", "skype", "7zip", "vlc", "sysinternals", "libreoffice", "putty.portable"]:}

Add it to site manifest

$ cat puppet/manifests/site.pp
class {gedit:}

Run Puppet Agent on Slave

On Windows slave

puppet agent -tdv

Pay attention to any error messages. On the first time, it takes a while as choco is installed and things are copied around.

Enjoy Automatically Installed Software

After the module has been applied, use start menu to launch VLC and Gedit.

Update: Fxied a typo.

Posted in Uncategorized | Tagged , , , , | 4 Comments

4 Responses to Automatically Install a List of Software to Windows – Chocolatey Puppet Provider

  1. Osa listatuista ohjelmista on vanhalla nimellä. Olen testannut että vlc, firefox ja gedit toimii.

  2. Tarkastelin lisää ja 7zip ja sysinternals eivät toimi

  3. Tommi Timonen says:

    Esimerkki moduulissa on typo.
    “skype, kohdassa pitäisi lukea “skype”,
    Tämä rikkoo moduulin.