How about something like;
$hasfile = true if $::hasfile { $fileensure = 'present' } else { $fileensure = 'absent' } file { "somefile" : ensure => $::fileensure, source => "puppet:///somefile", owner => "root", . . . } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CWF3DekKQwAJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.