summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp40
1 files changed, 19 insertions, 21 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index f9c3a81..5ad7b16 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -30,6 +30,25 @@ $apache2_macros = "/etc/apache2/conf.d/macros"
$apache2_conf = "/etc/apache2/apache2.conf"
class apache {
+ case $apache_www_folder {
+ '': { $apache_www_folder = "/var/www" }
+ }
+
+ case $apache_sites_folder {
+ '': { $apache_sites_folder = "${apache_www_folder}/sites" }
+ }
+
+ case $apache_error_folder {
+ '': { $apache_error_folder = "${apache_www_folder}/error" }
+ }
+
+ case $apache_error_dest {
+ '': { $apache_error_dest = "${apache_error_folder}/index.html" }
+ }
+
+ case $apache_server_name {
+ '': { $apache_server_name = $fqdn }
+ }
package { "apache":
name => "apache2",
@@ -75,27 +94,6 @@ class apache {
notify => Service["apache"],
}
- # prepare variables to use in templates
- case $apache_www_folder {
- '': { $apache_www_folder = "/var/www" }
- }
-
- case $apache_sites_folder {
- '': { $apache_sites_folder = "${apache_www_folder}/sites" }
- }
-
- case $apache_error_folder {
- '': { $apache_error_folder = "${apache_www_folder}/error" }
- }
-
- case $apache_error_dest {
- '': { $apache_error_dest = "${apache_error_folder}/index.html" }
- }
-
- case $apache_server_name {
- '': { $apache_server_name = $fqdn }
- }
-
define site($ensure = present, $docroot = false, $redirect = false,
$redirect_match = false, $protocol = 'http',
$server_alias = false, $use = false, $ticket = false,