Skip to content

Commit 36d0f41

Browse files
committed
Add pe_installer_source param to peadm::upgrade
To permit upgrades to download installer media from arbitrary URL
1 parent 0ca461d commit 36d0f41

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

plans/upgrade.pp

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
# A load balancer address directing traffic to any of the "B" pool
1212
# compilers. This is used for DR configuration in large and extra large
1313
# architectures.
14+
# @param pe_installer_source
15+
# The URL to download the Puppet Enterprise installer media from. If not
16+
# specified, PEAdm will attempt to download PE installation media from its
17+
# standard public source. When specified, PEAdm will download directly from the
18+
# URL given.
1419
#
1520
plan peadm::upgrade (
1621
# Standard
@@ -26,6 +31,7 @@
2631

2732
# Common Configuration
2833
Peadm::Pe_version $version,
34+
Optional[String] $pe_installer_source = undef,
2935
Optional[String] $compiler_pool_address = undef,
3036
Optional[String] $internal_compiler_a_pool_address = undef,
3137
Optional[String] $internal_compiler_b_pool_address = undef,
@@ -121,7 +127,10 @@
121127

122128
$platform = run_task('peadm::precheck', $primary_target).first['platform']
123129
$tarball_filename = "puppet-enterprise-${version}-${platform}.tar.gz"
124-
$tarball_source = "https://s3.amazonaws.com/pe-builds/released/${version}/${tarball_filename}"
130+
$tarball_source = $pe_installer_source ? {
131+
undef => "https://s3.amazonaws.com/pe-builds/released/${version}/${pe_tarball_name}",
132+
default => $pe_installer_source,
133+
}
125134
$upload_tarball_path = "/tmp/${tarball_filename}"
126135

127136
peadm::plan_step('preparation') || {

0 commit comments

Comments
 (0)