Ask Your Question

Managing Packages

asked 2013-12-18 22:01:04 -0600

Michael Bauer gravatar image


I want to manage about 200 packages with Puppet and I want a separate "package"-resource for each package. The problem is: Every time, the Puppet-Agent does a "run" / "apply", he checks every 200 packages. Each package-check needs about 2 seconds. Altogether it takes about 400 seconds, which is to much. I want the check to only few seconds. I heard that it would be possible if I use yaml with using a single command which contains all the desired packages. But I don't know how to do it.

Hopefully someone can help.


edit retag flag offensive close merge delete


What package provider are you using and are you ensuring specific versions or latest? It shouldn't be taking that long to process 200 package resources.

rodjek gravatar imagerodjek ( 2013-12-19 00:49:55 -0600 )edit

If you are using RHEL based systems, take a look at pulp to help manage packages.

spuder gravatar imagespuder ( 2014-03-10 21:50:03 -0600 )edit

3 Answers

Sort by » oldest newest most voted

answered 2013-12-20 07:35:40 -0600

gh gravatar image

Do not ensure 'latest'. Instead ensure that the package is present. You can use MCollective to update your packages during a maintenance event, as opposed to possibly updating packages every puppet run. As rodjek mentioned, if you are using latest, that could incur a longer amount of time per resource.

edit flag offensive delete link more

answered 2013-12-26 23:02:51 -0600

scoopex gravatar image

I think you question is not related to "yaml". It is possible to provide a list of packages using hiera (hiera is capable to use yaml files, see for an introduction), but that’s not the point.

If you provide a list of packages with a single package resource puppet might fetch the information about installed packages with a single command.


       package {
          'curl':                ensure => present;
          'wget':                ensure => present;
          'iftop':               ensure => present;
          'iptraf':              ensure => present;
          'sysstat':             ensure => present;
          'xfsdump':             ensure => present;
          'xfsprogs':            ensure => present;
          'zip':                 ensure => present;
          'ncftp':               ensure => present;

I you ... (more)

edit flag offensive delete link more

answered 2013-12-31 07:32:07 -0600

ethrbunny gravatar image

Use an external node classifier (enc). Have the list of which packages need to be upgraded dealt with server-side to save processing on your clients. Use whatever script language you like to generate this list when you update a given package on the server.

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



Asked: 2013-12-18 22:01:04 -0600

Seen: 238 times

Last updated: Dec 31 '13