> If you're writing modules for many distributions, or complex ones  
> with lots resources per class, you can't just say:
>
> notify => Service["apache2"]
>
> or
>
> require => File["/etc/apache2/conf.d/foo"]
>
> Because redhat has Service["httpd"] and so forth and so on, if the  
> OS specific code is in apache::service I can just do notify =>  
> Class["apache::service"] and it will always do the right thing, Same  
> I wouldn't want to maintain a huge require list for files - and I  
> wouldnt know what the operating systems do, requiring the class  
> solves that problem.

I solve that with aliases, at least the one with services:  
http://git.puppet.immerda.ch/?p=module-apache.git;a=blob;f=manifests/centos.pp;h=64af2d293c795ba8aee9fff13ea6c24b0b2ee8c7;hb=977ae4ccebde5554fb1793eb093af98778852fb7#l5

and I usually then always do notify => Service["apache2"]

require => File["/etc/apache2/conf.d/foo"] I would wrap anyway into a  
define to distinguish locations for different distros and then simply  
require the define.

I didn't yet come find a limitation with this solution, but yeah there  
might be one, some day.

cheers pete

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to