- From: Sean OMeara <
>
- To: "
" <
>
- Subject: [chef] Re: RE: Re: LWRP, append text to file only if it doesnt comtain it
- Date: Tue, 10 Mar 2015 15:20:18 -0400
Hi.
I wrote this cookbook years ago as a way to learn how to write resources.
The main problem with Chef::Util::FileEdit, is that it's a pure Ruby
library, and not a Chef resource.
Chef resources are convergent (test-and-repair), and can be marked as
"updated" for notifications/subscriptions.
I initially tried to use Chef::Util::FileEdit, but had trouble getting
it to tell me when it made changes.
Also, it leaves .bak files all over the place. (probably a bug)
-s
On Tue, Mar 10, 2015 at 2:49 PM, Ameir A.
<
>
wrote:
>
A cookbook I came upon by chance and don't hear anything about is the
>
"file" cookbook (yes, the name sounds confusing) [1]. It uses
>
Chef::Util::FileEdit under the covers. I've always wondered why the line
>
cookbook doesn't do that, and re-implements that logic. The main reason I
>
use the file cookbook over line is because I could never get notifications
>
to work with the line cookbook (I'm not sure that they're even supported).
>
>
[1] https://github.com/jenssegers/chef-file
>
>
Thanks,
>
Ameir
Archive powered by MHonArc 2.6.16.