Ask Your Question

How to install directly from a puppet:/// source on an windows client

asked 2015-04-21 06:54:08 -0600

JR gravatar image

updated 2015-04-22 03:36:26 -0600


I'm trying to set up a puppet server with windows clients and I wonder wether it's possible to install a Package directly from a puppet source.
When I try to first copy the msi file via Puppet to the Windows Client and install the package from the local file everything works fine.
As soon as I change the source Attribute of 'GeoGebra 5' to a puppet source or a mapped network drive the installation fails. This confuses me, because the exact same puppet source works fine for the file transfer.

site.pp ------------------8<-----------------

node 'test1' {
 file { 'C:\Downloads\GeoGebra-Windows-Installer-5-0-82-0.msi':
        ensure => present,
        source_permissions => 'ignore',
        source => 'puppet:///extra_files/GeoGebra.msi',

 package { 'GeoGebra 5':
         ensure => 'installed',
         source => 'puppet:///extra_files/GeoGebra.msi',


Error Message (German Version) -------------------8<----------

Error: Failed to install: Dieses Installationspaket konnte nicht geöffnet werden. Stellen Sie sicher, dass das Paket vorhanden ist und Sie darauf zugreifen können, oder wenden Sie sich an den Hersteller der Anwendung um sicherzustellen, dass es sich um ein gültiges Windows-Installationspaket handelt. [...]`

It translates to something like

Error: Failed to install: The package couldn't be opened. Make sure the package exists and that you can access it, or contact the manufacturer to make sure it's a valid Windows-package.

---- fileserver.conf ---

   path /etc/puppet/files
   allow *

------- auth.conf ------

# allow nodes to retrieve their own catalog
path ~ ^/catalog/([^/]+)$
method find
allow $1

# allow nodes to retrieve their own node definition
path ~ ^/node/([^/]+)$
method find
allow $1

# allow all nodes to access the certificates services
path /certificate_revocation_list/ca
method find
allow *

# allow all nodes to store their own reports
path ~ ^/report/([^/]+)$
method save
allow $1

# Allow all nodes to access all file services; this is necessary for
# pluginsync, file serving from modules, and file serving from custom
# mount points (see fileserver.conf). Note that the `/file` prefix matches
# requests to both the file_metadata and file_content paths. See "Examples"
# above if you need more granular access control for custom mount points.
path /file
allow *

# allow access to the CA certificate; unauthenticated nodes need this
# in order to validate the puppet master's certificate
path /certificate/ca
auth any
method find
allow *

# allow nodes to retrieve the certificate they requested earlier
path /certificate/
auth any
method find
allow *

# allow nodes to request a new certificate
path /certificate_request
auth any
method find, save
allow *

path /v2.0/environments
method find
allow *

# deny everything else; this ACL is not strictly necessary, but
# illustrates the default policy.
path /
auth any

edit retag flag offensive close merge delete


Do you have a mount point named "extra_files" defined in your fileserver.conf file? If so, please post a link to a pastebin of the fileserver.conf and auth.conf files.

GregLarkin gravatar imageGregLarkin ( 2015-04-21 15:34:32 -0600 )edit

JR, assuming the MSI file is downloaded from your master successfully, check akshay's solution below and my comment and let us know if that works for you.

GregLarkin gravatar imageGregLarkin ( 2015-04-22 10:41:04 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2015-04-22 04:42:26 -0600

akshay gravatar image
file {
        ensure => present,
        owner => administrator,
        group => users,
        mode => 0447,
        source => "puppet:///extra_files/GeoGebra.msi",
        notify => Package["geogebra"],
package {
        provider => "windows",
        ensure => installed, or **lateset** or **version **
        source => "C:\\Downloads\GeoGebra-Windows-Installer-5-0-82-0.msi",
        subscribe => Exec["msiexec /qn"]
exec {
        "msiexec /qn":
        command => "msiexec /qn /i C:\\Downloads\GeoGebra-Windows-Installer-5-0-82-0.msi",
        path => ["C:\\Downloads\GeoGebra-Windows-Installer-5-0-82-0.msi"],
        refreshonly => true,
edit flag offensive delete link more


The only change needed here is change the "notify" in the file resource to "before", then change the "subscribe" in the package resource to "notify", and it should work.

GregLarkin gravatar imageGregLarkin ( 2015-04-22 10:40:18 -0600 )edit

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: 2015-04-21 06:54:08 -0600

Seen: 1,763 times

Last updated: Apr 22 '15