Skip to content

Commit 0ca461d

Browse files
committed
Add pe_installer_source param to peadm::install
This will let users specify the download URL to retrieve the PE tarball from.
1 parent dbe702d commit 0ca461d

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

plans/install.pp

+7
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::install (
1621
# Standard
@@ -27,6 +32,7 @@
2732
# Common Configuration
2833
String $console_password,
2934
Peadm::Pe_version $version = '2019.8.8',
35+
Optional[String] $pe_installer_source = undef,
3036
Optional[Array[String]] $dns_alt_names = undef,
3137
Optional[String] $compiler_pool_address = undef,
3238
Optional[String] $internal_compiler_a_pool_address = undef,
@@ -66,6 +72,7 @@
6672

6773
# Common Configuration
6874
version => $version,
75+
pe_installer_source => $pe_installer_source,
6976
console_password => $console_password,
7077
dns_alt_names => $dns_alt_names,
7178
pe_conf_data => $pe_conf_data,

plans/subplans/install.pp

+13-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
# Config data to plane into pe.conf when generated on all hosts, this can be
2121
# used for tuning data etc.
2222
#
23+
# @param pe_installer_source
24+
# The URL to download the Puppet Enterprise installer media from. If not
25+
# specified, PEAdm will attempt to download PE installation media from its
26+
# standard public source. When specified, PEAdm will download directly from the
27+
# URL given.
28+
#
2329
plan peadm::subplans::install (
2430
# Standard
2531
Peadm::SingleTargetSpec $primary_host,
@@ -35,8 +41,9 @@
3541
# Common Configuration
3642
String $console_password,
3743
Peadm::Pe_version $version,
38-
Array[String] $dns_alt_names = [ ],
39-
Hash $pe_conf_data = { },
44+
Optional[String] $pe_installer_source = undef,
45+
Array[String] $dns_alt_names = [ ],
46+
Hash $pe_conf_data = { },
4047

4148
# Code Manager
4249
Optional[String] $r10k_remote = undef,
@@ -191,7 +198,10 @@
191198
}
192199

193200
$pe_tarball_name = "puppet-enterprise-${version}-${platform}.tar.gz"
194-
$pe_tarball_source = "https://s3.amazonaws.com/pe-builds/released/${version}/${pe_tarball_name}"
201+
$pe_tarball_source = $pe_installer_source ? {
202+
undef => "https://s3.amazonaws.com/pe-builds/released/${version}/${pe_tarball_name}",
203+
default => $pe_installer_source,
204+
}
195205
$upload_tarball_path = "/tmp/${pe_tarball_name}"
196206

197207
if $download_mode == 'bolthost' {

0 commit comments

Comments
 (0)