From 84ec0673fb38ce8f98aa845c65a0ed8c368669c6 Mon Sep 17 00:00:00 2001 From: Jacob Boissonnault Date: Tue, 24 Aug 2021 13:05:48 -0400 Subject: [PATCH] Add ability to use http addresses in download_url Modifies the regex used to generate $filename by allowing http and https addresses. --- manifests/install.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index fc92b02..878a353 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -4,7 +4,7 @@ # that in the future as it would greatly simplify this code and basically reduce it to # one package resource with type => chocolatey.... - $filename = regsubst($winlogbeat::real_download_url, '^https.*\/([^\/]+)\.[^.].*', '\1') + $filename = regsubst($winlogbeat::real_download_url, '^https?.*\/([^\/]+)\.[^.].*', '\1') $foldername = 'Winlogbeat' $zip_file = join([$winlogbeat::tmp_dir, "${filename}.zip"], '/') $install_folder = join([$winlogbeat::install_dir, $foldername], '/')