summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp14
1 files changed, 11 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 7ec5169..3c5caf8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -21,8 +21,6 @@
# TODO: log level, log files, etc
# TODO: better variable names, enable value overwriting
-$apache_sites_folder = '/var/users/home';
-$apache_www_folder = '/var/www/sarava';
class apache {
@@ -51,8 +49,18 @@ class apache {
notify => Service["apache"],
}
+ # prepare variables to use in templates
+ case $apache_sites_folder {
+ '': { $apache_sites_folder = '/var/www/sites' }
+ }
+
+ case $apache_www_folder {
+ '': { $apache_www_folder= '/var/www' }
+ }
+
# TODO: ensure folders exist with right modes and ownership
- define website($ensure = present, $alias = [], $use = []) {
+ define website($ensure = present, $docroot = false, $redirect = false,
+ $protocol = 'http', $alias = false, $use = false) {
file { "/etc/apache2/sites-available/$title":
ensure => $ensure,
content => template('apache/website.erb'),