Hi Folks,
I've tried this snippet several ways, both using case and selector
statements. I keep getting an error
root@ubuntu64:/etc/puppet/manifests# puppet parser validate
/etc/puppet/modules/timezone/manifests/params.pp
Error: Could not parse for environment production: Syntax error at '=>';
expected '}' at /etc/puppet/modules/timezone/manifests/params.pp:25
root@ubuntu64:/etc/puppet/manifests#
<comments above have been taken out>
15 class timezone::params {
16
17 $timezone = 'Australia/Darwin'
18 $hw_utc = true
19
20 # This is calculated in timezone class
21 $set_timezone_command = ''
22
23 case $::operatingsystem {
24 /^(?i:Debian|Ubuntu)$/: {
25 $config_file => '/etc/timezone'
26 }
27 /^(?i:RedHat|CentOS)$/: {
28 case $::operatingsystemmajrelease {
29 '7': $config_file => '/etc/localtime'
30 default: $config_file => '/etc/sysconfig/clock'
31 }
32 }
33 default: { $config_file => '/etc/sysconfig/clock' }
34 }
35
36 $config_file_mode = $::operatingsystem ? {
37 default => '0644',
38 }
39
40 $config_file_owner = $::operatingsystem ? {
41 default => 'root',
42 }
43
44 $config_file_group = $::operatingsystem ? {
45 'FreeBSD' => 'wheel',
46 default => 'root',
47 }
48
49 $source = ''
50 $template = "timezone/timezone-${::operatingsystem}"
51 $options = ''
52 $audit_only = false
53 $noops = false
54
55 }
If somebody wouldn't mind pointing out the error my ways, that would be
most appreciated.
Thanks
David
--
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/d580879f-1db3-478a-beee-73a81657cb14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.