Google Groups

Re: [Puppet Users] Re: Puppet on Windows: Avoid download msi files if they aren't going to be installed


Jeff McCune May 25, 2012 7:49 AM
Posted in group: Puppet Users
On Fri, May 25, 2012 at 5:43 AM, jcbollinger <John.Bo...@stjude.org> wrote:

On May 25, 3:58 am, tiochan <tioc...@gmail.com> wrote:

This stanza:

>     file { 'C:\\SOFTWARE\\7z920.msi':
>         source  => 'puppet://puppet.upc.edu/modules/windows/7z920.msi',
>     }

tells Puppet that there is supposed to be a file C:\\SOFTWARE\
\7z920.msi on the system, and its content is supposed to exactly match
that of puppet://puppet.upc.edu/modules/windows/7z920.msi.  That's
altogether independent of whatever use that file may have.  If the
file is missing when Puppet runs then it will download a fresh copy.
If it is present then Puppet will check its content; it will download
a fresh copy only if the content does not match.

If you do not want the file downloaded every time then either
1) leave it in place where Puppet puts it (per your instructions), or
2) remove that stanza, because it is a lie if you don't actually want
the file to be there.


> A band of having a software repository mounted as a mapped drive... Is
> possible to avoid that the msi file to being downloaded if it is not going
> to be installed?


If you make the MSI file accessible to the system via a mapped drive
or network share then you can exercise option (2) above without losing
the ability to run the installer.

You can also provide a plain HTTP(S) URI to the source parameter and it will only be downloaded if it's not already installed.

-Jeff