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


Chronological Thread 
  • From: Marcelo de Moraes Serpa < >
  • To:
  • Subject: [chef] Re: Re: Appending to an existing file, i.e nginx site
  • Date: Mon, 18 Mar 2013 23:08:39 -0600

@Jesse, that makes sense. Having a new template based off the old one, but with the added data. Thanks for the idea.

@AJ Sorry if I got you upset, wasn't my intention. I tried googling for it before posting. This is a very specific need for an automation script I'm setting up, and will only be used for adding "static" components to an existing domain (a landing page for example, for a promo) in a specific path. 

Of course, I could just create a small application that could serve those static files from a specific route. I was just wondering someone out there had a similar use case and used Chef to implement it, since it just seemed easir to serve them from nginx (and I didn't want to add the path conf manually, hence the post).

And thank you very much for the URLs, very interesting resources!

- Marcelo.

On Mon, Mar 18, 2013 at 2:24 PM, AJ Christensen < " target="_blank"> > wrote:
Sorry for my initial reply.

Please don't edit files that already exist. Please never do this.

If you really must:

http://community.opscode.com/cookbooks/line
https://github.com/opscode/chef/blob/master/lib/chef/util/file_edit.rb
http://augeas.net/

Hope this helps, thanks in advance, and please use the mailing list
search functionality next time before posting a new thread.

Cheers,

AJ

On 15 March 2013 20:20, Marcelo de Moraes Serpa < "> > wrote:
> Hi list,
>
> I have a use case where I need to append a location to an existing nginx
> site (in /etc/nginx/sites-enabled/sitename), this site was also deployed by
> another recipe of mine.
>
> Why? Well, basically it's a static site componente that should be accessed
> as a path, but the main app should remain intact. They *should share the
> same domain*.
>
> I should be pretty straightforward to do, but I'd like to know if anyone
> else had a similar use case before? If so, how did you approach it?
>
> Thanks in advance!
>
> M>




Archive powered by MHonArc 2.6.16.

§