summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp15
-rw-r--r--templates/website.erb7
2 files changed, 16 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 5172678..7ec5169 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -26,11 +26,18 @@ $apache_www_folder = '/var/www/sarava';
class apache {
- package { "apache": ensure => installed; }
+ package { "apache": ensure => installed, }
+
+ # TODO: enable mod_macro
+ package { "mod_macro":
+ name => "libapache2-mod-macro",
+ ensure => installed,
+ require => Package["apache"],
+ }
service { "apache":
ensure => running,
- require => Package["apache"],
+ require => Package["apache", "mod_macro"],
}
# apache mod_macro configuration
@@ -45,9 +52,7 @@ class apache {
}
# TODO: ensure folders exist with right modes and ownership
- define website($ensure = present, $drupal = false, $pmwiki = false,
- $moin = false, $trac = false, $ikiwiki = false,
- $custom = false) {
+ define website($ensure = present, $alias = [], $use = []) {
file { "/etc/apache2/sites-available/$title":
ensure => $ensure,
content => template('apache/website.erb'),
diff --git a/templates/website.erb b/templates/website.erb
index 3398f60..56be471 100644
--- a/templates/website.erb
+++ b/templates/website.erb
@@ -1 +1,6 @@
-# TODO: virtual host definition
+# begin vhost for <%= $title %>
+<VirtualHost *:80>
+ # TODO
+ ServerName <%= $title %>.<%= $domain %>
+</VirtualHost>
+# end vhost for <%= $title %>