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: {
              fail("Unrecognized timezone $timezone")
      }

  # rest of the class.
  ....
  }

I hope this helps.

-frederiko



On Thu, Sep 5, 2013 at 9:25 AM, Greg Coit <gregc...@gmail.com> wrote:

> 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("Unrecognized timezone $timezone") }
>     }
>   }
>
> The above gives me "Error: Could not retrieve catalog from remote server:
> Error 400 on SERVER: Syntax error at 'timezone'; expected '}' at
> /etc/puppet/modules/linux/manifests/init.pp:56 on node" but It's unclear to
> me what I've done wrong.  Any suggestions?
>
> Thank you in advance!
>
> Greg
>
> --
> 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 puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to