I believe the ENC already has access to the node's stored value and would 
display that after assignment if assigned. 

I didn't consider 'cost' but it would seem that loading 'params.pp' values 
is not a large cost in terms of server but perhaps just in programming.

I am just gathering that the primary thinking is that if you don't know the 
values you want to use to override, then don't override. 

Myself, I am trying not to longhand some of the variables and am choosing 
to use ns1 rather than nameserver1 

On Monday, November 3, 2014 3:03:51 PM UTC-7, Felix.Frank wrote:
>
> Hi, 
>
> sounds like a complex problem. 
>
> Here's a simple counter case that shows why I don't think that any ENC 
> out there does this. 
>
> class resolv::params { 
>     if $ipaddress =~ /^192/ { 
>         $ns1 = '192.168.0.1' 
>     } 
>     else { 
>         $ns1 = '8.8.8.8' 
>     } 
> } 
>
> The raison d'etre (as far as I know it - never used this pattern myself) 
> for params classes is their ability to centrally define defaults that 
> are derived from fact values. The ENC would have to interpret the 
> manifest for the params class in question, using the node's stored data 
> as the basis. 
>
> Doing this on the fly does not sound feasible to me - this is quite an 
> expensive operation. So the ENC would have to maintain some kind of 
> cache for all those values. This, in turn, sounds like a lot of work. 
> The it probably would be a cool feature to add to the ENC of your choice 
> :-) 
>
> Cheers, 
> Felix 
>
> On 10/14/2014 11:17 PM, Craig White wrote: 
> > I am trying to figure out if parameterized variables can be displayed 
> > when hovering over the appropriate section in an ENC. At the moment, I 
> > am playing with PE 3.3 with it's console/dashboard and my previous 
> > experience was with puppet 2.6.x and Foreman. 
> > 
> > Simplified example, module resolv 
> > 
> > # resolv/manifests/init.pp 
> > class resolv ( 
> >   $ns1 = $resolv::params::ns1, 
> >   ) inherits resolv::params { 
> >   include resolv::config 
> > } 
> > 
> > # resolv/manifests/params.pp 
> > class resolv::params { 
> >   $ns1 = '192.168.0.1' 
> > } 
> > 
> > So when I am editing a node and adding an override in the puppet 
> > dashboard (ENC), I hover over the box $ns1 where I can override the 
> > value and it shows me what I will get if I don't override, which is 
> > 'default: $ns1::params::ns1' which is absolutely meaningless at that 
> > point and I was hoping it would show the assignment from params.pp 
> > 
> > Is this just something I can't fix or am I misunderstanding how to use 
> > parameterized variables? 
> > 
> > Craig 
> > 
>
>

-- 
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/34216231-6e0b-4635-99c1-2cf3f8e0aa85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to