For example, I have a bunch of package resources defined for packages which are contained in the yum repositories defined by the yumrepo resources. If the package is installed first, then it will fail because the repository is not available. I know about "require". But I would prefer not to add a direct dependency on the source repository. Is there an easier way to do this? What would be especially nice to say that all package resources must be done after all yumrepo resources. - Ian
On Jan 22, 2007, at 3:33 PM, Ian Burrell wrote:> For example, I have a bunch of package resources defined for packages > which are contained in the yum repositories defined by the yumrepo > resources. If the package is installed first, then it will fail > because the repository is not available. I know about "require". But > I would prefer not to add a direct dependency on the source > repository. Is there an easier way to do this? What would be > especially nice to say that all package resources must be done after > all yumrepo resources.There''s no way to say that all instances of one type depend on all instances of another type, but you can say that all instances of one type depend on one or more instances of another: Package { require => [Yumrepo[one], Yumrepo[two], ...] } The next Puppet release should simplify that a bit by allowing you to say Yumrepo[one, two, three]. -- Progress isn''t made by early risers. It''s made by lazy men trying to find easier ways to do something. --Robert Heinlein --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Mon, 2007-01-22 at 18:19 -0600, Luke Kanies wrote:> On Jan 22, 2007, at 3:33 PM, Ian Burrell wrote: > > > For example, I have a bunch of package resources defined for packages > > which are contained in the yum repositories defined by the yumrepo > > resources. If the package is installed first, then it will fail > > because the repository is not available. I know about "require". But > > I would prefer not to add a direct dependency on the source > > repository. Is there an easier way to do this? What would be > > especially nice to say that all package resources must be done after > > all yumrepo resources. > > There''s no way to say that all instances of one type depend on all > instances of another type, but you can say that all instances of one > type depend on one or more instances of another: > > Package { require => [Yumrepo[one], Yumrepo[two], ...] } > > The next Puppet release should simplify that a bit by allowing you to > say Yumrepo[one, two, three].Would it be possible to use an autorequire for this ? Basically say in the package type that a package with provider ''yum'' depends on all the known yumrepo instances ? David
On Jan 22, 2007, at 8:27 PM, David Lutterkort wrote:> > Would it be possible to use an autorequire for this ? Basically say in > the package type that a package with provider ''yum'' depends on all the > known yumrepo instances ?Yeah, that would be pretty easy. -- It''s a small world, but I wouldn''t want to paint it. -- Stephen Wright --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com