right, the reason I did not opt for this syntax is because my file resource is actually quite large, and I think the other method Stefan suggested has better readability.
On Wed, Dec 14, 2011 at 7:34 AM, Felix Frank <[email protected]> wrote: > This should also work: > > file { "somefile": source => ..., owner => ... } > > if $::hasfile { > File["somefile"] { ensure => present } > } > else { > File["somefile"] { ensure => absent } > } > > It's up to you to decide which is more obscure. > > Cheers, > Felix > > -- > 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. > -- 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.
