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


Chronological Thread 
  • From: Joseph Bowman < >
  • To:
  • Subject: [chef] Re: Appending to an existing file, i.e nginx site
  • Date: Tue, 19 Mar 2013 11:36:27 -0400

Just a thought, can't 

/etc/nginx/sites-enabled/sitename

Be a template or file deployed via chef?

For apache we have a standard build from source I wrote, which includes the httpd.conf.

For the local.conf I store it in templates, with a template for each host we have. The are deployed via this recipe.

template "/usr/local/apache2/conf.d/local.conf" do
  source "configs/${node['fqdn']}_local.conf.erb"
end

So for www.myhost.com I have a template file www.myhost.com_local.conf.erb

I took this approach because then we have a nice system for keeping our web server configs in a system we already have version control set up for. Also a nice central place to examine and edit apache configs when we need to.

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.

§