Ask Your Question

How to install Package on Windows Remotely

asked 2014-08-11 10:27:32 -0500

louis gravatar image

I see that the way to install puppet packages on the windows platform goes like this

file { ...


package {

... require => File['<the installer="" file="">'] }

or ..

package { ... source -> '<unc path="">' }

I have some windows modules that need to be deployed in a LAN environment and also on EC2. I personally don't like the File and Package approach since you can get stuck with a lot large binaries on the local machine even after the successful installation of the Package.

On the other hand, having a UNC path just does not apply for scenarios where there are machines not members of a Domain like Vagrant Boxes or EC2 Machines.

Is there a way to accomplish something like ...


.... source => '<http url="" or="" s3="" location="">' }

I believe i can accomplish the same purpose by using exec resource type but that should not be the case. The File resource type should not be used because the purpose is not to keep the file on the local machine and is to have the package installed.

edit retag flag offensive close merge delete


What stops you from doing a clean up after the package has been installed? Something like: file {..ensure => absent, require => Package['....'],} It's fairly ugly, but gets the job done.

dliu052 gravatar imagedliu052 ( 2014-08-20 04:29:05 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-07-26 00:51:03 -0500

johnnyb04 gravatar image

updated 2015-07-26 00:52:36 -0500

As an example I've created a custom fact that determines the current version of Firefox. I simply add an if statement that says

(psuedo code) if $firefox_version != $latest_version then file {'firefox': ensure => present} and package {'firefox_pkg': ensure => installed} else file{'firefox': ensure=>absent}

(This can actually be handled without checking the version since Firefox puts its version in the file name. I did this as a solution to other programs that didn't.)

edit flag offensive delete link more

answered 2014-09-15 15:01:49 -0500

What about using the staging module to grab the files first? Then you could do that, put the file somewhere that the default package provider for Windows could recognize, and then cleanup the file afterwards?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-08-11 10:27:32 -0500

Seen: 651 times

Last updated: Jul 26 '15