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 , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Picks

  • Boxing Clock for AndroidOcton8 Diving T-ShirtsShaking Tower Panda Android GameLearn Chinese with Android
  • Student projects