On Jun 7, 2007, at 3:57 AM, Adrian Bridgett wrote:
[...]> Ideally I suppose the update should be part of the Package type (this
> is updating the list of available packages, not updating an individual
> package).
This requires the ability to specify a relationship with a whole
class of resources -- basically, saying that all packages depend on
this resource.
You can fake it for now by adding the following to the top of your
configuration:
Package { require => Exec[apt-update] } # or whatever the exec is called
This still leaves some room for problems, in that if you specify a
require manually, then it will override the default require, but as
long as you keep that in mind, it''s not the end of the world.
I''d like to find a way to specify this kind of class relationship,
since it''s occurring often in the package world and sometimes other
places, too, but I don''t have an idea for how to do it yet. Ideas
are appreciated.
> Ideally I''d like apt-update to run if anything under /etc/apt is
> altered at all - however I couldn''t see anything to say that you
can
> subscribe to a directory recursively.
Just subscribe to the top-level dir:
file { "/etc/apt": recurse => true, checksum => md5 }
exec { "apt-get update": subscribe => File["/etc/apt"],
refreshonly
=> true }
--
I hate to advocate drugs, alcohol, violence, or insanity to anyone,
but
they''ve always worked for me. -- Hunter S.
Thompson
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com