puppetlabs/puppetlabs-nginx — pull request #24 by gnarf37 (2012-04-30 08:03:49+00:00)
Title: Force presence of at least one vhost even if none are defined

I noticed the other day that when I use the nginx module, if I don't define a vhost it always seems to blow up on me. There are a few configs that I have that don't use the vhost template, and just add a `.conf` file to `/etc/nginx/conf.d` manually.

The error:

err: /Stage[main]/Nginx::Service/Exec[rebuild-nginx-vhosts]: Failed to call refresh: /bin/cat /tmp/nginx.d/* > /etc/nginx/conf.d/vhost_autogen.conf returned 1 instead of one of [0] at /etc/puppet-stage/modules/nginx/manifests/service.pp:21
err: /Stage[main]/Nginx::Service/Service[nginx]: Failed to call refresh: Could not restart Service[nginx]: Execution of '/etc/init.d/nginx restart' returned 1: at /etc/puppet-stage/modules/nginx/manifests/service.pp:28

I made it always create a header file in the `/tmp/nginx.d` folder so this error wouldn't happen.