Re: [Puppet Users] Puppet + APT, I am lost...

Martijn Grendelman
Tue, 31 Aug 2010 22:35:30 -0000

Mathias Gug schreef:
>> I am not sure how I said I want to do an update before /every/ package
>> install. Once at the start of a Puppet-run, /IF/ one or more packages
>> need to be installed, would suffice.
>
> You may run into a chicken-egg problem. Packages that are configured as
> "ensure => latest" can only be upgraded by puppet if the local
apt cache
> files are up-to-date.
>
> IOW puppet relies on the local apt files to figure out if packages need
> to be updated. And to get new local apt files apt-get update needs to be
> run.
>

I am aware of that, but that''s not a problem. I could easily run an
update every day outside of Puppet (on Debian, APT installs a cronjob
that can take care of this by default, it just needs to be configured).

That way, Puppet would pick up the new versions sooner or later. But
what I am trying to achieve, has a different background.

Our development team regularly releases new software, packaged in a
Debian package with a unique name. The idea is that we just give Puppet
a new package {foo: } and have these new packages be installed ASAP. We
even use triggered runs to speed things up and to make sure that several
servers remain identical.

But for this to work, the Puppet run needs to run aptitude update to
pick up the new package name. Running the update periodically isn''t
enough, but running an update on every catalog run is just overkill.

Hope this explains my motives, and maybe someone has any more tips!

Best regards,
Martijn.