On 12/05/2010 07:23 PM, cyrus wrote: > I have the following setup > > http://pastebin.com/bWANRpsP > > And was wondering if anyone could comment on whether my philosophy is > correct. The issue I am having is this. 99% of my systems need to be > configured identically. However every now and then there is a system > that needs a slight tweak. > > As an example, all systems need to have syslog configured. The syslog > class that is included in base simply ensures syslog is installed, > running and pushes out a configuration file. That works for 99% of my > systems but as there is a system every now and then that needs a > slightly different syslog.conf file. How can I build in the logic to > the syslog class so that I can specify different configuration files > farther down the chain if need be?
This structure doesn't make much sense. Inherit a class if you need some tweak to the way it behaves, and only then. In your example, you could have class syslog_enable_tcp inherits syslog { # I'm making this up, mkay? ;-) File["/etc/syslog.conf"] { ... } } with the appropriately changed config file. Then your base class include syslog, but on those special machines you mentioned, you include syslog_enable_tcp as well (farther down the chain, as you say). Inherit class base only if any resources defined in it directly (there probably are none) must be different on selected systems. Those systems then include the descendant. 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-us...@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.