summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-15 17:16:16 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-15 17:16:16 -0200
commit07806df3d3257e36013d15825d2237eaec1e7235 (patch)
tree26d5a39d1c0f8f8238bf8279f1ffbdf293b78df1 /manifests
parentf55b8471ed50cb464a7d33041063e325bc263626 (diff)
downloadpuppet-nginx-07806df3d3257e36013d15825d2237eaec1e7235.tar.gz
puppet-nginx-07806df3d3257e36013d15825d2237eaec1e7235.tar.bz2
Managing default site and nginx.conf
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp26
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"),
}
}