summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-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"),
}
}