aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp15
-rw-r--r--templates/drupal.sh.erb4
2 files changed, 8 insertions, 11 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d0a6e6b..7a9f4c5 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,12 +1,9 @@
-class drupal inherits pear {
-
- case $apache_www_folder {
- '': { fail("you need to define \$apache_www_folder for drupal module") }
- }
-
- case $apache_sites_folder {
- '': { fail("you need to define \$apache_sites_folder for drupal module") }
- }
+class drupal(
+ $folder = "${apache::www_folder}/drupal"
+ $sites_folder = "${apache::sites_folder}"
+ $www_folder = "${apache::sites_www_folder}"
+) {
+ include pear
# We use drupal source from upstream
package { "drupal6":
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb
index 1124268..d10658a 100644
--- a/templates/drupal.sh.erb
+++ b/templates/drupal.sh.erb
@@ -3,8 +3,8 @@
# Drupal management script.
#
-SITES="<%= apache_sites_folder %>"
-BASE="<%= apache_www_folder %>"
+SITES="<%= scope.lookupvar('drupal::sites_folder') %>"
+BASE="<%= scope.lookupvar('drupal::www_folder') %>"
SERIES="5 6 7"
# Read a parameter from user