On Tuesday, September 15, 2015 at 2:33:16 PM UTC-5, Julian Meier wrote: > > Thanks you! The explanation about private and public classes is just great! > > So, there seems to be no way to define IN the module how public classes > get evaluated (order), right? >
Evaluation order is deterministic, as governed by the order of DSL statements in your manifests. Manifests are evaluated in document order, left-to-right, top-to-bottom. In that sense, yes, you can define in a module in what order classes are evaluated. You cannot, however, use declarations in one manifest to influence the order of evaluation of declarations in a different manifest. This is why the differentiation between public and private classes is so important. For private classes, you can control evaluation order because you can control all the places where a declaration may be evaluated, but for public classes, all bets are off. I really want to use some params from `::ospuppet` in `::ospuppet::master` > and `::ospuppet::server` ( > https://github.com/juame/juame-ospuppet/tree/0.3.0). > > That's fine. Then rely on automated data binding to set those parameter values. If class ::ospuppet serves *only* to house such shared data, then as a bonus, you will no longer need to declare it from outside the module at all. In that case you could make it private, but if you do so then I would rename it to avoid confusion, maybe to ::ospuppet::data. Or if you're going that far, then you could also consider getting rid of the shared data class altogether. Your two other classes could instead obtain the data directly from Hiera, by calling one of its data-access functions. You then obtain data sharing / deduplication by having each class that wants the data look it up in Hiera via the same key. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/4aa89f72-b662-41ec-a81f-ab371824374f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
