Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-17 Thread Richard Gray
Hi, If you have Foreman configured as an ENC, the location parameter will be available to Hiera as a fact. e.g. In the master section of puppet.conf, you'll have something like (node.rb comes from Foreman): external_nodes = /etc/puppet/node.rb Then in hiera.yaml you can reference the locatio

Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-17 Thread Eddie Mashayev
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 mad

Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-11 Thread Eddie Mashayev
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’ > :h

Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-10 Thread Richard Gray
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, yo

Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-10 Thread Martin Alfke
On 10 Aug 2015, at 09:54, Eddie Mashayev wrote: > Hi Martin, > > Thanks for the help. I used the second approach. > > 1) I’ve created custom fact to identify the server location (I’m using the > timezone fact) – Now I’m able to identify all my servers by location. > 2) I’m not sure about t

Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-10 Thread Eddie Mashayev
Hi Martin, Thanks for the help. I used the second approach. 1) I’ve created custom fact to identify the server location (I’m using the timezone fact) – Now I’m able to identify all my servers by location. 2) I’m not sure about the second part “put ntp::servers into the appropriate hiera data

Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-09 Thread Martin Alfke
Hi Eddie, On 09 Aug 2015, at 16:25, Eddie Mashayev wrote: > Hi All, > > I have many servers spread in 3 different time zones USA (NY and San > Francisco) and also in ISR. Have 3 NTP servers, one NTP server in each > location. > https://forge.puppetlabs.com/puppetlabs/ntp module is letting y

[Puppet Users] Help with NTP module provided by puppetlabs

2015-08-09 Thread Eddie Mashayev
Hi All, I have many servers spread in 3 different time zones USA (NY and San Francisco) and also in ISR. Have 3 NTP servers, one NTP server in each location. https://forge.puppetlabs.com/puppetlabs/ntp module is letting you to insert an array of NTP servers class { '::ntp': servers => [ 'n