On 16.4.2013 16:30, jcbollinger wrote: > [... which carries maintenance costs typical of such boilerplate > repetition.] > > It sounds to me like requiring an explicit declaration for each project > class is the way to go. As I said already, however, that's entirely > unrelated to the question of avoiding repetitive declaration patterns. > > You might be able to use collections to solve this problem. Proceed > carefully, as Puppet has at times had issues with collecting classes (as > opposed to ordinary resources), but the basic idea would be for > Class['apache'] to contain something along these lines: > > Class['apache::config'] -> Class<| tag == 'apache::project' |> ~> > Class['apache::service'] > > That way, you have the needed relationship declarations in one central > place. It should not cause project classes that you have not otherwise > declared to be declared, and I don't think it will be sensitive to the > order of your declarations. You will probably find that you need to > tweak that somewhat to get it to work is you want, however. You might > find that it helps to require each (top) project class to explicitly tag > itself with some well-known tag. >
Thanks! That sounds good. Will try it out. BR, Boyan
signature.asc
Description: OpenPGP digital signature