- From: Arnold Krille <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Chef Recipe inserting a line before last line in fie
- Date: Mon, 10 Dec 2012 21:44:52 +0100
On Mon, 10 Dec 2012 04:14:11 +0000 Juanje Ojeda Croissier
<
>
wrote:
>
As I had a similar problem time ago, i did create a similar cookbook
>
(which is also at the community site and be installed from there):
>
>
https://github.com/juanje/cookbook-conf
>
>
There are some examples about how to use this LWRP. Maybe one of them
>
fit your needs.
>
I have one action that append a line just after specific line, but not
>
to prepend, but I could add this action easily if is needed.
>
>
It's something to be used just if is really no way to use a template,
>
it tries to be as much idempotence as it can.
Oh, this is nice! I did create something similar but much simpler for
appending lines and just used some shell magic.
With your LWRP, what happens in :insert_after_match when the line to be
inserted is already present? Or is this best catched with a not_if
-entry?
I think I will test your recipe the next days.
Have fun,
Arnold
Attachment:
signature.asc
Description: PGP signature
Archive powered by MHonArc 2.6.16.