I have a class
class whs::auth {
if ($macosx_productversion_major == '10.9'){
file { 'authorization109':
path =>
'/System/Library/Security/authorization.plist',
ensure => file,
owner => 'root',
group => 'wheel',
mode => '0644',
source =>
'puppet:///modules/whs/authorization-10.9.plist',
}
exec { 'auth.db' :
command => '/bin/mv /var/db/auth.db
/var/db/auth.db.orig',
subscribe => File["authorization109"],
refreshonly => true,
}
}
elseif ($macosx_productversion_major == '10.8') {
file { 'authorization108':
path => '/etc/authorization',
ensure => file,
owner => 'root',
group => 'wheel',
mode => '0644',
source =>
'puppet:///modules/whs/authorization-10.8',
}
}
}
This class works fine if I comment out the elseif statement.
I highlighted the line that corresponds with the errors.
with the elseif statement I get this from my agent:
> *Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Syntax error at '{'; expected '}' at
> /etc/puppet/modules/whs/manifests/auth.pp:21 on node aaronshegrud.___.___*
> *Warning: Not using cache on failed catalog**Error: Could not retrieve
> catalog; skipping run*
if I remove the Parens I get an error saying:
> *Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Syntax error at '=='; expected '}' at
> /etc/puppet/modules/whs/manifests/auth.pp:21 on node aaronshegrud.___.___*
> *Warning: Not using cache on failed catalog**Error: Could not retrieve
> catalog; skipping run*
I don't know what I am doing wrong...
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/fe028abc-38a7-47ad-ae76-f49f7223bfd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.