On 02/08/2011 07:59 AM, Joe Gross wrote: > I think I solved my own problem. Now things look like this. I can still > do specific node overrides, but this seems to do what I'm hoping for. > > If there's a better way to do this sort of thing I'm happy to be corrected. > > class general { > include dsh > include getty > include grub > include ntp > include postfix > include ssh > include sudo > include sysadmin > } > > node default { > $role = inline_template('<%= hostname.sub(/\w+-([a-z]+)\d*/){$1} %>') > include general > }
Hi. Yes, this is currently possible and (I believe) quite common. While I appreciate your cfengine background, this way of thinking may well get you stuck rubbing puppet wrong forever, though. Puppet leans (IMO) more strongly towards a loose architecture, making decisions at mixed granularities, such as if $virtual == "physical" { include ssh } at some central place in your manifests, and making more such choices *inside* the ssh class as well. You may even want to replace your role semantics by a collection of custom facts you install on all your boxes that will explain puppet what to do. Just my 2c 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.