On Wed, Jul 13, 2011 at 3:34 AM, Arnaud Gomes-do-Vale <arnaud.go...@ircam.fr
> wrote:

>
> >   # Resource defaults for Packages in this class
> >   Package {
> >     ensure => installed,
> >     require => Package['php'],
> >     notify => Service['httpd']
> >   }
>
> This creates a dependency loop:


An option here is to override the require on a per-package basis.

If you set a resource default for require, and then separately set require
for individual resources, they will overwrite the resource default rather
than append to it.

You could also use collections to do what you want, this is untested, but
something like:

Package <| title != "php" |> {
  require => Package['php'],
  notify => Service['httpd']
}

should work I believe.


-- 
Nigel Kersten
Product Manager, Puppet Labs
Twitter: @nigelkersten

*Join us for **PuppetConf *<http://www.bit.ly/puppetconfsig>
September 22nd and 23rd in Portland, Oregon, USA.
*
*

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to