Yes: declare the package unconditionally.
File
/usr/lib/libl.a belongs to the package you're considering installing. Any locally-built, system-wide Flex should be in
/usr/local, not in
/usr, so you're basically saying that you always want the flex-devel package to be present on the system. This goes straight to Puppet's core behavior: it manages machine state, performing those state changes needed to put target machines into a specified state. As such, it tests the current state to determine what to do. You don't need to do anything special to achieve that, just
package { "flex-devel":
ensure => 'present'
# or, ensure => 'latest'
}
If the package is already present (alternatively, if the latest available version is already present) then Puppet will not attempt to install / update.
John