Hi Richard,

Just wondering, I do have now a locations configured on my Foreman 
(:locations_enabled: true), how can I access this data? 
For example if I have a Facter variable named $location or $os_version so I 
can use it on mypuppet scripts. How can I use Foreman locations variable?
Hope I made myself clear :)


Thanks,

EddieM

On Tuesday, August 11, 2015 at 6:12:58 PM UTC+3, Eddie Mashayev wrote:
>
> Thanks for the help :)
>
> On Tuesday, August 11, 2015 at 1:24:48 AM UTC+3, Richard Gray wrote:
>>
>>
>>
>> On 10/08/15 20:12, Martin Alfke wrote:
>>
>> You need to create a hiera.yaml config file.
>> The config file may look like this:
>>
>> :backends:
>>   - yaml
>> :yaml:
>>   :datadir: ‘/etc/puppet/data’
>> :hierachy:
>>   - “nodes/#{::certname}”
>>   - “location/#{::timezone}”
>>   - global
>>
>>
>>
>> Further to Martin's comment, you may be interested to know that the 
>> Foreman location and environment are available to Hiera, so you might 
>> prefer to use those rather than the timezone fact. E.g.
>>
>> :backends:
>>   - yaml
>> :yaml:
>>   :datadir: ‘/etc/puppet/data’
>> :hierachy:
>>   - “nodes/#{::certname}”
>>   - “location/#{::location}”
>>   - global
>>
>> -- 
>>
>> *Richard Gray* | Senior Operations Engineer 
>> *DDI:* +64 9 950 2196 *Fax:* +64 9 302 0518 
>> *Mobile:* +64 21 050 8178 *Freephone:*0800 SMX SMX (769 769) 
>> *SMX Limited:* Level 15, 19 Victoria Street West, Auckland, New Zealand 
>> *Web:* http://smxemail.com 
>> [image: SMX | Cloud Email Hosting & Security] 
>> This email has been filtered by SMX. For more information visit 
>> smxemail.com.
>>
>

-- 
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/bd0b95d1-bf7d-4c2a-aab8-50cfbba97906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to