From 3d5de27f1ce51ae113adc5866540c3b23b500646 Mon Sep 17 00:00:00 2001 From: Fabien Culpo Date: Fri, 12 Oct 2018 17:10:40 +0200 Subject: [PATCH 1/2] Puppet 5 and 6: add subdirectory for windows agents download url --- manifests/windows/install.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/windows/install.pp b/manifests/windows/install.pp index cdf13764f..4d08fdc1d 100644 --- a/manifests/windows/install.pp +++ b/manifests/windows/install.pp @@ -19,7 +19,12 @@ $_https_source = "https://pm.puppetlabs.com/puppet-agent/${_pe_server_version}/${_agent_version}/repos/windows/${package_file_name}" } else { - $_https_source = "https://downloads.puppetlabs.com/windows/${package_file_name}" + $dir = $package_file_name ? { + /.*-5\..*/ => 'puppet5/', + /.*-6\..*/ => 'puppet6/', + default => '' + } + $_https_source = "https://downloads.puppetlabs.com/windows/${dir}${package_file_name}" } $_install_options = $install_options ? { From 51f178896d9729c9fe3da78dc6a7489031faa654 Mon Sep 17 00:00:00 2001 From: smcclellan Date: Thu, 18 Oct 2018 13:09:17 -0500 Subject: [PATCH 2/2] (maint) Use longer regex --- manifests/windows/install.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/windows/install.pp b/manifests/windows/install.pp index 4d08fdc1d..53a6905ba 100644 --- a/manifests/windows/install.pp +++ b/manifests/windows/install.pp @@ -20,8 +20,8 @@ } else { $dir = $package_file_name ? { - /.*-5\..*/ => 'puppet5/', - /.*-6\..*/ => 'puppet6/', + /puppet-agent-5\..*/ => 'puppet5/', + /puppet-agent-6\..*/ => 'puppet6/', default => '' } $_https_source = "https://downloads.puppetlabs.com/windows/${dir}${package_file_name}"