Problem with Puppet reinstalling Windows APPs

觀看次數:40 次
跳至第一則未讀訊息

ratatapa

未讀,
2016年12月8日 下午5:01:378/12/2016
收件者︰ 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

未讀,
2016年12月9日 上午1:31:299/12/2016
收件者︰ 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

未讀,
2016年12月9日 上午8:05:369/12/2016
收件者︰ Puppet Users、dirk.he...@recommind.com
Thanks, but that would seem to be an issue for updates then

Dirk Heinrichs

未讀,
2016年12月9日 上午8:15:379/12/2016
收件者︰ 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

未讀,
2016年12月9日 上午9:35:589/12/2016
收件者︰ 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

未讀,
2016年12月9日 上午10:07:479/12/2016
收件者︰ 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

未讀,
2016年12月9日 上午10:20:369/12/2016
收件者︰ 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

未讀,
2016年12月9日 上午10:55:269/12/2016
收件者︰ 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.

回覆所有人
回覆作者
轉寄
0 則新訊息