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


Chronological Thread 
  • From: Jesse Campbell < >
  • To: chef < >
  • Subject: [chef] Re: Appending to an existing file, i.e nginx site
  • Date: Mon, 18 Mar 2013 14:18:04 -0400

If the existing template used to create the site contains the line you need to modify, but you want to modify the value, then you should be able to modify the nginx site resource (it should be on the resource path) to add the required information... just use the same resource name and only specify what you want to change.

If it doesn't yet contain that line, you'll need to use a different template (you could override which template gets used by modifying the resource, for example) or modify the existing template to add the line.



On Fri, Mar 15, 2013 at 3:20 AM, Marcelo de Moraes Serpa < " target="_blank"> > 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.

§