Philip Brown
unread,Mar 19, 2013, 5:01:16 PM3/19/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
I've been using the stdlib::file_line resource happily for a bit now, but then ran into a problem
I have a class, which can be simplified as follows
class prop(propval)
{
file_line {conffile:
line=>"PROPERTY=propval"
}
}
However, I'm attempting to plan for the future, and it sounds rather useful to have the ability to remove the property completely.
The app I'm configuring this for, expects to see NO "PROPERTY=" value, if you want to disable this feature.
Unfortunately, I dont see a way to do it, without some ugly exec() calls.
In other words, what I'd LIKE to be able to do, is someting like
file_line{ conffile:
line=>"PROPERTY=",
match=> "^PROPERTY=.*",
ensure=>absent,
}
and then have file_line remove a line, if present, that matches "PROPERTY=".
After all, it can do
replace "^PROPERTY=" with "PROPERTY=foo"
So surely there's some way to do
replace "^PROPERTY=" with "[empty]"
?