> class baseclass {
> 
>     $classes = ["aaa", "access", "banner", "func", "hosts", "munin",
> "ntp", "resolv", "rhn", "rsyslog", "ssh", "sudo"]
> 
>     define include_class() {
> 
>         if ($exclude_classes == undef) or ! ($name in $exclude_classes) {
>             include $name
>         }
> 
>     }
> 
>     include_class{ $classes: }
> 
> }

Sort of funky, I like it!

It may work, but $exclude_classes should not be a vairable, but a
parameter to your define instead.

This way, you can override the include_class in a subclass of baseclass
to set exclude_class to the name of the class.

You can have it easier by making this a boolean:

baseclass {
  define include_class($exclude = false) {
    if !$exclude { include $name }
  }
}

class baseclass::no_rsyslog {
  Include_class["rsyslog"] { exclude => true }
}

Let me know if this works, because it would rule ;-)

Cheers,
Felix

-- 
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