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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5457FBF0.8060206%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to