Hi Sans,

My issue was solved. My actual key name was "portOffset". Note about the 
camel case. (there is a capital 'O'). What I did was changed it to just 
"portoffset" and works fine. Is this a issue ?

Regards,
Malintha Adikari

On Tuesday, June 17, 2014 5:58:29 PM UTC+5:30, Sans wrote:
>
> Hi there,
>
> First of all, if it's a fact, then you really should be doing *${::key1}* 
> instead. 
>
> To use it in template, *<%= @key1 %>* should work just fine.  Otherwise, 
> you can have this: *$localkey = ${::key1}* in your init.pp and then *<%= 
> @localkey %>* in the template but I don't think you gonna get anything 
> thing better.
>
> On the agent, if you do: *facter -p key1*, do you get the result that you 
> expect? Best!
>  
>
> On Tuesday, June 17, 2014 12:33:06 PM UTC+1, Malintha Adikari wrote:
>>
>>
>>   I have defined some key value pairs in /etc/facter/facts.d/value.txt 
>> file. I could use those keys inside my init.pp script and successfully for 
>> the values using
>>
>>    *${key1}*
>>  
>>
>> I want to get those values inside my template file. I have used 
>>
>>    *<%= @key1 %>*
>>  
>>
>> but it doesn't give me the value. What is the correct way to get the 
>> value of the external fact inside template.
>>
>> Regards,
>>
>> Malintha
>>
>

-- 
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/0dcd6392-30ec-47b9-acd8-a688aef6ddef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to