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

Nigel Kersten
Tue, 31 Aug 2010 20:51:50 -0000

On Tue, Aug 31, 2010 at 1:41 PM, Darren Chamberlain <darren@boston.com>
wrote:
> * Martijn Grendelman <martijn at grendelman.net> [2010/08/31 22:02]:
>> What I would like, is for Puppet to run `aptitude update` before
>> it installs or upgrades packages. That doesn''t seem out of the
>> ordinary to me, but I can''t make it work in Puppet.
>
> I would do the `aptitude update` in cron, outside of puppet, and
> manage the cronjob via the cron type.  That would eliminate your
> precedence and ordering problems completely.

Not if you wish to use puppet to manage your repositories as well, and
we do a lot of that.

We do this in our wrapper script

* apt-get update
* apt-get upgrade our-config-tools-metapackage
* run puppetd


That way we can push out a new version of puppet and associated
support tools out of band of the actual puppet run, and then puppet
runs can continue that add additional repositories and install
packages.

This also gives us an out of band way of fixing issues with broken
puppet clients by adding a package to our-config-tools-metapackage and
performing the fixes in the package scripts.



>
> --
> There are only two hard things in Computer Science: cache invalidation
> and naming things.
>    -- Phil Karlton
>
> --
> You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
>
>



--
nigel