- From: AJ Christensen <
>
- To: "
" <
>
- Subject: [chef] Re: LWRP, append text to file only if it doesnt comtain it
- Date: Wed, 11 Mar 2015 06:26:13 +1300
Use someara's line cookbook:
https://supermarket.chef.io/cookbooks/line
append_if_no_line "make sure a line is in dangerfile" do
path "/tmp/dangerfile"
line "HI THERE I AM STRING"
end
Consider searching the supermarket for cookbooks before sending a
message to every Chef community mailing list user like this. Thanks in
advance.
cheers,
--aj
On Wed, Mar 11, 2015 at 6:18 AM, Medya
<
>
wrote:
>
is there any LWRP way to do append a text to a file if it does NOT contain
>
it ?
>
>
for exmaple
>
>
add PEERDNS=no to this file
>
/etc/sysconfig/network-scripts/ifcfg-eth0
>
>
only if it is not there
Archive powered by MHonArc 2.6.16.