From 1d31719dbe6603717357289da03dfaea11d3dc92 Mon Sep 17 00:00:00 2001 From: AdamCousins Date: Fri, 1 Jul 2016 18:23:51 +1000 Subject: [PATCH 1/3] all for latest to be defined which will grab the latest release from wordpress.org site --- manifests/instance/app.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifests/instance/app.pp b/manifests/instance/app.pp index 467c800..451b4fa 100644 --- a/manifests/instance/app.pp +++ b/manifests/instance/app.pp @@ -66,6 +66,8 @@ ## tar.gz. file name lang-aware if $wp_lang { $install_file_name = "wordpress-${version}-${wp_lang}.tar.gz" + } elsif $version == 'latest' { + $install_file_name = "${version}.tar.gz" } else { $install_file_name = "wordpress-${version}.tar.gz" } From 7d430e86816a0bd1fe937a9bc8aa98986a37b6bc Mon Sep 17 00:00:00 2001 From: AdamCousins Date: Fri, 1 Jul 2016 18:29:19 +1000 Subject: [PATCH 2/3] fix with variable --- manifests/instance/app.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/instance/app.pp b/manifests/instance/app.pp index 451b4fa..c3acb6f 100644 --- a/manifests/instance/app.pp +++ b/manifests/instance/app.pp @@ -73,7 +73,7 @@ } ## Download and extract - exec { "Download wordpress ${install_url}/wordpress-${version}.tar.gz to ${install_dir}": + exec { "Download wordpress ${install_url}/${install_file_name} to ${install_dir}": command => "wget ${install_url}/${install_file_name}", creates => "${install_dir}/${install_file_name}", require => File[$install_dir], From c9913d1e5a5c160f78c4d8fb3c29a3991df438bb Mon Sep 17 00:00:00 2001 From: AdamCousins Date: Fri, 1 Jul 2016 19:55:14 +1000 Subject: [PATCH 3/3] fix if condition --- manifests/instance/app.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/instance/app.pp b/manifests/instance/app.pp index c3acb6f..d4c6c81 100644 --- a/manifests/instance/app.pp +++ b/manifests/instance/app.pp @@ -64,7 +64,7 @@ } ## tar.gz. file name lang-aware - if $wp_lang { + if $wp_lang != '' { $install_file_name = "wordpress-${version}-${wp_lang}.tar.gz" } elsif $version == 'latest' { $install_file_name = "${version}.tar.gz"