- From: Juan Jesús Ojeda Croissier <
>
- To:
- Subject: [chef] Re: Re: A line resource?
- Date: Mon, 9 Jan 2012 12:51:49 +0100
On Mon, Jan 9, 2012 at 11:31 AM, Thom May
<
>
wrote:
>
On Sat, Jan 7, 2012 at 23:53, Tim Uckun
>
<
>
>
wrote:
>
> Is there a "line" resource? I am thinking of something like this
>
> http://automateit.org/documentation/classes/AutomateIt/EditManager/EditSession.html
>
>
There's Chef::Util::FileEdit ; see https://gist.github.com/1582357
>
for an example.
>
-t
I did a LWRP for deal with plain files. Something similar to what we
are talking about here:
https://github.com/gecos-team/cookbook-conf
Here is a example of how to use it:
https://github.com/gecos-team/cookbook-usermanagement/blob/master/recipes/shares.rb
I had plans for create a second one for INI files. It's almost done,
but I had to stop to finish somethings else. I hope to finish it after
I get done some stuff.
BTW, to get the LWRP working I did change the class Chef::Util::FileEdit
https://github.com/gecos-team/cookbook-conf/blob/master/libraries/file_edit.rb
And the change is already proposed to Chef:
http://tickets.opscode.com/browse/CHEF-2740
I hope this help.
Any comments on the LWRP are welcome.
--
Juanje
Archive powered by MHonArc 2.6.16.