Problem with Puppet reinstalling Windows APPs

40 views
Skip to first unread message

ratatapa

unread,
Dec 8, 2016, 5:01:37 PM12/8/16
to Puppet Users
Hi everyone! new puppet user and i'm still learning, doing good atm but having a small issue

I have a package that install Adobe Reader DC on my nodes, the issue is that each time i run puppet agent -t it always reinstall Adobe Reader.

Is there any way to tell puppet to ignore if program is already installed?

Dirk Heinrichs

unread,
Dec 9, 2016, 1:31:29 AM12/9/16
to puppet...@googlegroups.com
Am 08.12.2016 um 20:09 schrieb ratatapa:

I have a package that install Adobe Reader DC on my nodes, the issue is that each time i run puppet agent -t it always reinstall Adobe Reader.

Is there any way to tell puppet to ignore if program is already installed?

Yes. On Windows (and only on Windows), the resource title of a package resource must match exactly what Windows shows in the "Name" column when you open "Control Panel\All Control Panel Items\Programs and Features". So in your case, it should look like

    package { 'Adobe Acrobat Reader DC':
        ...
    }

HTH...

    Dirk
--
Dirk Heinrichs | Senior Systems Engineer, Delivery Pipeline
http://mimage.opentext.com/alt_content/binary/images/email-signature/recommind-ot.png
Tel: +49 2226 159666 (Ansage) 1149
Email: dirk.he...@recommind.com
Skype: dirk.heinrichs.recommind

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 10646

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

ratatapa

unread,
Dec 9, 2016, 8:05:36 AM12/9/16
to Puppet Users, dirk.he...@recommind.com
Thanks, but that would seem to be an issue for updates then

Dirk Heinrichs

unread,
Dec 9, 2016, 8:15:37 AM12/9/16
to Puppet Users
Am 09.12.2016 um 14:05 schrieb ratatapa:

Thanks, but that would seem to be an issue for updates then

No, that would be the version, not the name. Just read the docs:

"The title (or name) of the package must match the value of the package’s DisplayName property in the registry, which is also the value displayed in the “Add/Remove Programs” or “Programs and Features” control panel.
If the provided name and the installed name don’t match, Puppet will believe the package is not installed and try to install it again."

Rob Nelson

unread,
Dec 9, 2016, 9:35:58 AM12/9/16
to puppet...@googlegroups.com
I think in this case it's an issue because Adobe puts version numbers in the product name - it's not Acrobat Reader anymore, it's Acrobat Reader DC or Acrobat Reader X, which leads to having to change two strings. Definitely not a fan of their versioning scheme.

--


You received this message because you are subscribed to the Google Groups "Puppet Users" group.


To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/eb55769f-a375-6b88-b38c-191423990ef4%40recommind.com.


For more options, visit https://groups.google.com/d/optout.


--
Rob Nelson

Dirk Heinrichs

unread,
Dec 9, 2016, 10:07:47 AM12/9/16
to puppet...@googlegroups.com
Am 09.12.2016 um 15:35 schrieb Rob Nelson:

I think in this case it's an issue because Adobe puts version numbers in the product name - it's not Acrobat Reader anymore, it's Acrobat Reader DC or Acrobat Reader X, which leads to having to change two strings. Definitely not a fan of their versioning scheme.

Nope. At least on my system, the name is "Adobe Acrobat Reader DC" and the version is "15.020.20042". However, you're right in that some packages add the version to the name, for example Git for Windows, where the name looks like "Git version 2.11.0". In that case, one can either do:

class git ($version = undef) {
    package { "Git version ${version}":
        ...
    }
}

or use the chocolatey package provider from PuppetForge, like

class git {
    package { 'git':
        provider => 'chocolatey',
        ensure => latest,
        ...
    }
}

Note that in the 2nd example, one could also add the $version paramater and use that instead of latest. Depends on your needs.

Bye...

Rob Nelson

unread,
Dec 9, 2016, 10:20:36 AM12/9/16
to puppet...@googlegroups.com
What I meant is that it was just 'Acrobat Reader' in v1-9, then it was 'Acrobat Reader X', then a series of other names before v15 became 'Acrobat Reader DC'. It's a crapshoot every time they release a new version. This is not fun when there isn't a chocolate package to use instead.

--


You received this message because you are subscribed to the Google Groups "Puppet Users" group.


To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.





For more options, visit https://groups.google.com/d/optout.


--
Rob Nelson

Dirk Heinrichs

unread,
Dec 9, 2016, 10:55:26 AM12/9/16
to puppet...@googlegroups.com
Am 09.12.2016 um 16:20 schrieb Rob Nelson:

This is not fun when there isn't a chocolate package to use instead.

Reply all
Reply to author
Forward
0 new messages