Hello All,
I'm not able to do an if/then statement within a file resource
declaration. I'm basically trying to distinguish between OS release, so
that I can assign an appropriate template. This is what I have:
class basic_dev::files {
file { "/etc/sudoers":
owner => root,
group => root,
mode => 0440,
if $operatingsystemrelease <= 5.4 then {
content => template("system/sudoers_V54.erb")},
else {
content => template("system/sudoers.erb")},
backup => ".bak"
}
For some reason is not working. I keep on getting error: "Could not
retrieve catalog from remote server: Error 400 on SERVER: Syntax error at
'if'; expected '}' "
Any ideas?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.