On Thursday, December 20, 2012 12:47:54 PM UTC-6, Andy Parker wrote:
>
> On Thu, Dec 20, 2012 at 10:23 AM, llowder <[email protected] <javascript:>
> > wrote:
>
>> I plan on opening a feature request on this, but I wanted to start a 
>> discussion and get an idea of possibilities and implications before I did.
>>
>> I think it would be nice to be able to use the databinding feature of 
>> hiera / puppet 3 with defines. Now, since defined types are not singletons, 
>> it does pose a bit of a problem in terms of addressing.
>>
>> How problematic would it be to support something like:
>>
>> define module::mydefine(
>>   $param1 = 'value'
>>   ){
>>   ....
>>   }
>>
>> In the node def:
>>
>> module::mydefine{ 'foo': }
>>
>> Somewhere in the hiera hierarchy something like:
>>
>> module::mydefine::foo::param1: 'othervalue'
>>
>> I know under current setups, the above key would be corresponding to a 
>> class located at $modulepath/module/manifests/mydefine/foo.pp
>>
>> but would something like I described even be feasible? Or is there 
>> another construct that would allow similar usage?
>>
>
> I think that would be feasible. I can't see any problems with that format 
> for the data off the top of my head. Another possibility might be to have a 
> define expect that the key 'module::mydefine' contains a hash of namevar => 
> param-hash. Something like that might be nicer, but I don't think it would 
> work as well with the hiera lookups.
>
> Once we start doing that though, it seems like for consistency we would 
> want to have it also work for non-define types (user, group, service, 
> etc.). Is that a sensible way to be going? For instance, if we didn't do 
> this all the way, then there would be no way to change from a define type 
> to a custom type in a manner that an end user would not notice.
>

Making that available for all types - custom, defined, builtin, could have 
uses, in terms of data separation mostly (that I can think of off hand). I 
can *almost* see this being used to allow an ENC to declare individual 
resources for a node.. but I am not positive that is a good idea, or even 
exactly how it would work (though I think the hash key syntax for the 
classes could be used but I am not very familiar with this aspect of puppet)

 
>
>>
>> Thanks.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Developers" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/puppet-dev/-/67dFxhI3re8J.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-dev?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-dev/-/gwtMG6-Uw6wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to