On Tuesday, December 1, 2015 at 11:26:15 PM UTC-6, François Lafont wrote:
 

> No, no. You can see 
> http://puppet-on-the-edge.blogspot.fr/2015/01/puppet-40-data-in-modules-and.html
>  
> With puppet 4, the "data philosophy" has changed. 
>
>
I think "the data philosophy has changed" is a bit of an overreach.  Two 
things relevant to the current discussion have happened:

   1. Puppet has adopted a data-in-modules mechanism into the core.  This 
   has been long desired, and was available -- in different form -- as a 
   third-party module for Puppet 3.  This, I already knew about.
   2. Puppet has added a mechanism to write custom functions in Puppet DSL, 
   including such functions as underpin the data-in-modules mechanism.  This, 
   I had overlooked.

None of that impacts my primary thesis, however.  It still is impossible to 
reliably predict what value a class parameter of an as-yet undeclared class 
would take if that class were declared later, by unspecified means.  You 
can determine what value Puppet would choose via automated data binding, 
but even supposing that yields a value at all -- it does not need to do -- 
you cannot, in general, be certain that automated data binding is the 
mechanism that ultimately will be used to set that parameter's value.  That 
is, you cannot, in general, predict what value a class parameter *will *take. 
If you are willing to ensure that the class is declared, however, then you 
can easily determine what value any of its parameters *does* take.

If you conceive a module to be in a position to control or even to know 
whether and how a class from a different module is declared, then that's a 
strong signal that you should combine or refactor your modules.  If you 
think one module has need for direct access to in-module data of a 
different module, then that is also a signal that you should combine or 
refactor.


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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/66192e4b-b834-440a-a928-3398754f5a40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to