Searching old archive I find this topic:
http://groups.google.com/group/puppet-users/browse_thread/thread/187ee3897a26ae2a/32fea612e79dda80?hl=en&lnk=gst&q=puppet+case+statement+in+file+resource#32fea612e79dda80
I understand that "case statements must be outside of resource
statements" per that discussion and I understand the usage for the
selector in-statement solution, however that's just for assignment
though.
Consider this simple file resource, I just want to have a external
variable that control whether I need the file in the system:
file { "somefile" :
case ${hasfile} {
"true": { ensure => present }
default: { ensure => absent }
}
source => "puppet:///somefile",
owner => "root",
.
.
.
}
Obviously I had a syntax error here because case statement is not
happy within the resource.
So, what's a recommended puppet way to do something like this? thx in
advance.
--KL
--
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.