Well, I tried, and (even in default.pp) i can access the var with $::env.

Thanks anyway.

Le mercredi 13 novembre 2013 14:50:56 UTC+1, Thomas RICOU a écrit :
>
> 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" to that group, the parameter will available 
>> in puppet as a top-scope/global variable, i.e. $::foo. 
>>
>> 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]. 
>> > To view this discussion on the web visit 
>> > 
>> 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. 
>>
>>

-- 
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/0e39d7ea-a59d-47d8-aa08-edba39a76866%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to