Oh wow. I shouldn't comment before I have my coffee. Yes you have it
exactly right, if you call the parameter "env", it will show up as
"$::env". I've fixed the example below.

-jantman

On 11/13/2013 08:50 AM, Thomas RICOU wrote:
> Hi, I think you understood quite well my question even if  I was not
> so clear... ;)
>
> Anyway, according to what you say, let's say that my (ENC) group is
> named 'DEVEL' and the var named 'env' is set to 'devel'. I add the
> node 'foo.example.com' to the 'DEVEL' group. Shouldn't the var be
> named '::env' instead of '::foo' ? Because when I addthe node
> 'bar.example.com' to that same group, the variable will be '::env' or
> '::bar' ?
>
> Thx
> Tom
>
> Le mercredi 13 novembre 2013 13:29:44 UTC+1, Jason Antman a écrit :
>
>     Tom,
>
>     I'm not sure I totally understand your question; I've also never
>     used an
>     ENC (like dashboard) with default.pp, only with modules.
>
>     If you set a parameter called "env" on a group in Dashboard, and then
>     add node "foo.example.com <http://foo.example.com>" to that group,
>     the parameter will available
>     in puppet as a top-scope/global variable, i.e. $::env.
>
>     Is that what you were asking?
>
>     -jantman
>
>     On 11/13/2013 06:54 AM, Thomas RICOU wrote:
>     > Hi
>     >
>     > I'm kinda noobish to puppet and I can't find an answer to my
>     question.
>     > What can I can do with the dashboard groups ? In fact I'm
>     interested
>     > in setting a var "env" to a value in ['devel','valid','prod']. this
>     > value should be set only once when I create a new virtual machine
>     > using a puppet agent. The thing is that this machine will use a
>     > "default" node configuration which needs to know the value of the
>     > "env" var. For some reasons, I don' t want to create a node file
>     per
>     > machine setting this param so I searched for something very easy
>     to do
>     > so. I found the "Groups" I saw in the dashboard web interface
>     and in
>     > which I created that "env" var but I can't figure out how to get
>     it's
>     > value back in default.pp node file.
>     >
>     > Am I completely wrong using these Groups?
>     >
>     > Thanks
>     >
>     > Tom
>     > --
>     > 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] <javascript:>.
>     > To view this discussion on the web visit
>     >
>     
> https://groups.google.com/d/msgid/puppet-users/d267b355-fc88-4f23-b60e-dffcb7f12de1%40googlegroups.com
>     
> <https://groups.google.com/d/msgid/puppet-users/d267b355-fc88-4f23-b60e-dffcb7f12de1%40googlegroups.com>.
>
>     > For more options, visit https://groups.google.com/groups/opt_out
>     <https://groups.google.com/groups/opt_out>.
>
> -- 
> 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/ba237ea7-16d8-406c-b9de-27ef2728e1ec%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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/5283D54B.3040907%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to