diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-19 16:12:15 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-19 16:12:15 -0200 |
commit | ade34cd0124bd2eb3c28605d73bf4b62ca405a08 (patch) | |
tree | cff7408d017a1fa11c59b89e9de96087f29c1480 | |
parent | b321a9a143a2e1830ef6c9de59343ba08f25fbfe (diff) | |
download | puppet-drupal-ade34cd0124bd2eb3c28605d73bf4b62ca405a08.tar.gz puppet-drupal-ade34cd0124bd2eb3c28605d73bf4b62ca405a08.tar.bz2 |
Upgrading for 2.7 compatibility --config
-rw-r--r-- | manifests/init.pp | 15 | ||||
-rw-r--r-- | templates/drupal.sh.erb | 4 |
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 |