diff options
-rw-r--r-- | manifests/init.pp | 16 | ||||
-rw-r--r-- | templates/wordpress.sh.erb | 2 |
2 files changed, 6 insertions, 12 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index aa24593..a433910 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,15 +1,9 @@ -class wordpress { +class wordpress( + $folder = ${apache::www_folder}, + $locale = '' +) { - case $wordpress_folder { - '' : { - case $apache_www_folder { - '': { fail("you need to define \$apache_www_folder for wordpress module") } - default: { $wordpress_folder = $apache_www_folder } - } - } - } - - $real_wordpress_locale = $wordpress_locale ? { + $real_wordpress_locale = $locale ? { '' => '', default => "-${wordpress_locale}" } diff --git a/templates/wordpress.sh.erb b/templates/wordpress.sh.erb index 41d739f..826dc82 100644 --- a/templates/wordpress.sh.erb +++ b/templates/wordpress.sh.erb @@ -3,7 +3,7 @@ # wordpress management script. # -BASE="<%= wordpress_folder %>" +BASE="<%= folder %>" LOCALE="<%= real_wordpress_locale %>" # Set alternative base |