puppetlabs/puppetlabs-stdlib — pull request #263 by yath (2014-05-27 19:38:46+00:00)
Title: Remove matching lines in absent file_line

Use the pattern specified in 'match' when using ensure => absent to
decide which lines should be removed.

Useful for something like:

```puppet
if empty($partitions) {
$ensure = 'absent'
} else {
$partitions_arg = join(prefix($partitions, '-p'), ' ')
$ensure = 'present'
}

file_line{'check_disk':
ensure => $ensure,
patch => '/etc/nagios/nrpe.cfg',
line => "command[check_disk]=../nagios/plugins/check_disk -w10 -c5 $partitions_arg",
match => '^command\[check_disk\]='
}
```