[chef] Re: Re: Re: Appending to an existing file, i.e nginx site


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Re: Re: Appending to an existing file, i.e nginx site
  • Date: Tue, 19 Mar 2013 07:37:47 -0700

Im not sure if we can have a standard resource for this type of action. For specific tasks, we can have dedicated resource, for example the sysctl cookbook does provide a resource/provider[1], which is much cleaner/safer to use across multiple cookbooks. Given that all config files does not follow same patterns, its difficult to generalize this. Albeit these resources can use file edit behind the scenes (for cases where sysctl like interface is  absent).

What might make sense have a set of common patterns (like gitconfig, ini etc) implemented and then subclass it from there.



On Tue, Mar 19, 2013 at 7:29 AM, Michael Della Bitta < " target="_blank"> > wrote:
On Mon, Mar 18, 2013 at 4:24 PM, AJ Christensen < "> > wrote:
> Please don't edit files that already exist. Please never do this.

Is that really a practical edict? What about files like
/etc/sysctl.conf needing to be written to by multiple recipes?

FileEdit works, but it gets a bad rap on this list. Chef's going to
need a canonical and supported way to do this...


Michael Della Bitta

------------------------------------------------
Appinions
18 East 41st Street, 2nd Floor
New York, NY 10017-6271

www.appinions.com

Where Influence Isn’t a Game




Archive powered by MHonArc 2.6.16.

§