Re: [Puppet Users] basic case statement question

2013-09-05 Thread Frederiko Costa
Hi, To me, this would look like this. You're assigning the 'server' variable using =>, rather than =: class { '::ntp': case $timezone { 'PDT': { servers = [ '0.us.pool.ntp.org', '1.us.pool.ntp.org', ' 2.us.pool.ntp.org', '3.us.pool.ntp.org'] } default: { fa

Re: [Puppet Users] basic case statement question

2013-09-05 Thread Frederiko Costa
Ohh.. my bad. You're actually instantiating the parametized class ntp. I accidentally thought you were writing your module. In that case, you might want to try using selectors. But I don't remember from the top of my head if the fail() function would work. Let's stick with the 'case' anyway ... T

Re: [Puppet Users] basic case statement question

2013-09-05 Thread Greg Coit
Frederiko, That worked perfectly! I was trying to be too fancy I guess. Thank you for the help Greg On Thursday, September 5, 2013 11:27:02 AM UTC-7, Frederiko Costa wrote: > > Ohh.. my bad. You're actually instantiating the parametized class ntp. I > accidentally thought you were writin

Re: [Puppet Users] basic case statement question

2013-09-05 Thread Greg Coit
Thank you for the reply Frederiko. Unfortunately, that doesn't seem to be the issue. The following is from the pupetlabs/ntep docs and works: class { '::ntp': servers => [ '0.us.pool.ntp.org', '1.us.pool.ntp.org', '2.us.pool.ntp.org', '3.us.pool.ntp.org'], } Greg On Thursday, Septem

[Puppet Users] basic case statement question

2013-09-05 Thread Greg Coit
Hi all, I'm using the puppetlabs/ntp module and would like to define the ntp servers based on the fact timezone: #ntp class { '::ntp': case $timezone { PDT: { servers => [ '0.us.pool.ntp.org', '1.us.pool.ntp.org', '2.us.pool.ntp.org', '3.us.pool.ntp.org'], } default: { fail("