diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-02-15 17:16:16 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-02-15 17:16:16 -0200 |
commit | 07806df3d3257e36013d15825d2237eaec1e7235 (patch) | |
tree | 26d5a39d1c0f8f8238bf8279f1ffbdf293b78df1 /manifests | |
parent | f55b8471ed50cb464a7d33041063e325bc263626 (diff) | |
download | puppet-nginx-07806df3d3257e36013d15825d2237eaec1e7235.tar.gz puppet-nginx-07806df3d3257e36013d15825d2237eaec1e7235.tar.bz2 |
Managing default site and nginx.conf
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 4972730..2e66f78 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -90,6 +90,16 @@ class nginx::base { notify => Service["nginx"], } } + + # Main configuration + file { "/etc/nginx/nginx.conf": + content => template("nginx/nginx.conf.erb"), + owner => "root", + group => "root", + mode => 0644, + ensure => present, + notify => Service["nginx"], + } } class nginx inherits nginx::base { @@ -107,8 +117,13 @@ class nginx inherits nginx::base { } # Default site - nginx::base::site { "$domain": ensure => present, } + nginx::base::site { "default": + ensure => present, + source => 'template', + } + # Domain site + nginx::base::site { "$domain": ensure => present, } } class nginx::puppetmaster inherits nginx::base { @@ -147,12 +162,7 @@ class nginx::puppetmaster inherits nginx::base { ensure => absent, } - file { "/etc/nginx/nginx.conf": - content => template("nginx/nginx.conf.erb"), - owner => "root", - group => "root", - mode => 0644, - ensure => present, - notify => Service["nginx"], + File["/etc/nginx/nginx.conf"] { + content => template("nginx/nginx.conf.puppetmaster.erb"), } } |