Hi Eddie, On 09 Aug 2015, at 16:25, Eddie Mashayev <[email protected]> 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 you to insert > an array of NTP servers > > class { '::ntp': > servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], > } > > I can override this array but the problem is how to fit the correct NTP > server to each server in the different location. > In other words, how can I modified the puppet module to fit server to the > correct NTP Server by locations. > > For example - I thought using the server prefix name to choose the right NTP > server, for example if this server is located in NY so it prefix name is > ny-{server name} so I can fit it to NY NTP server but it look like a headache > to do it. > > Do you have any idea how can it be done in most efficient way with the NTP > module provided by puppetlabs. Several solutions: 1. write wrapper module per data center: class ny_ntp { class { ‘::ntp’: server => [‘ny_ntp.corp.com’], } } class sf_ntp { class { ‘::ntp’: servers => [‘sf_ntp.corp.com’], } } class isr_ntp { class { ‘::ntp’: servers => [‘isr_ntp.corp.com’], } } use one of the the wrapper class within node classification 2. use hiera provide a custom fact to identify location per server and put ntp::servers into the appropriate hiera data hierarchy. Best, Martin > > > Thanks, > EddieM > > -- > 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/8cdf1ae0-46c8-4de6-bb06-9f42bdbd31ed%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/0CB6F615-A45C-408F-90B2-CCAEB9FCBC01%40gmail.com. For more options, visit https://groups.google.com/d/optout.
