Skip to content

Commit 5b3fe63

Browse files
committed
Remove insecure pe_installer_source parameter
1 parent 6bac026 commit 5b3fe63

File tree

4 files changed

+5
-60
lines changed

4 files changed

+5
-60
lines changed

REFERENCE.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,6 @@ The following parameters are available in the `peadm::install` plan:
20152015
* [`compiler_pool_address`](#-peadm--install--compiler_pool_address)
20162016
* [`internal_compiler_a_pool_address`](#-peadm--install--internal_compiler_a_pool_address)
20172017
* [`internal_compiler_b_pool_address`](#-peadm--install--internal_compiler_b_pool_address)
2018-
* [`pe_installer_source`](#-peadm--install--pe_installer_source)
20192018
* [`ldap_config`](#-peadm--install--ldap_config)
20202019
* [`final_agent_state`](#-peadm--install--final_agent_state)
20212020
* [`stagingdir`](#-peadm--install--stagingdir)
@@ -2071,17 +2070,6 @@ architectures.
20712070

20722071
Default value: `undef`
20732072

2074-
##### <a name="-peadm--install--pe_installer_source"></a>`pe_installer_source`
2075-
2076-
Data type: `Optional[Stdlib::HTTPSUrl]`
2077-
2078-
The URL to download the Puppet Enterprise installer media from. If not
2079-
specified, PEAdm will attempt to download PE installation media from its
2080-
standard public source. When specified, PEAdm will download directly from the
2081-
URL given.
2082-
2083-
Default value: `undef`
2084-
20852073
##### <a name="-peadm--install--ldap_config"></a>`ldap_config`
20862074

20872075
Data type: `Optional[Peadm::Ldap_config]`
@@ -2496,7 +2484,6 @@ The following parameters are available in the `peadm::upgrade` plan:
24962484
* [`compiler_pool_address`](#-peadm--upgrade--compiler_pool_address)
24972485
* [`internal_compiler_a_pool_address`](#-peadm--upgrade--internal_compiler_a_pool_address)
24982486
* [`internal_compiler_b_pool_address`](#-peadm--upgrade--internal_compiler_b_pool_address)
2499-
* [`pe_installer_source`](#-peadm--upgrade--pe_installer_source)
25002487
* [`final_agent_state`](#-peadm--upgrade--final_agent_state)
25012488
* [`r10k_known_hosts`](#-peadm--upgrade--r10k_known_hosts)
25022489
* [`stagingdir`](#-peadm--upgrade--stagingdir)
@@ -2541,17 +2528,6 @@ architectures.
25412528

25422529
Default value: `undef`
25432530

2544-
##### <a name="-peadm--upgrade--pe_installer_source"></a>`pe_installer_source`
2545-
2546-
Data type: `Optional[Stdlib::HTTPSUrl]`
2547-
2548-
The URL to download the Puppet Enterprise installer media from. If not
2549-
specified, PEAdm will attempt to download PE installation media from its
2550-
standard public source. When specified, PEAdm will download directly from the
2551-
URL given.
2552-
2553-
Default value: `undef`
2554-
25552531
##### <a name="-peadm--upgrade--final_agent_state"></a>`final_agent_state`
25562532

25572533
Data type: `Enum['running', 'stopped']`

plans/install.pp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
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.
1914
# @param ldap_config
2015
# If specified, configures PE RBAC DS with the supplied configuration hash.
2116
# The parameter should be set to a valid set of connection settings as
@@ -47,7 +42,6 @@
4742
# Common Configuration
4843
String $console_password,
4944
Peadm::Pe_version $version = '2021.7.9',
50-
Optional[Stdlib::HTTPSUrl] $pe_installer_source = undef,
5145
Optional[Array[String]] $dns_alt_names = undef,
5246
Optional[String] $compiler_pool_address = undef,
5347
Optional[String] $internal_compiler_a_pool_address = undef,
@@ -94,7 +88,6 @@
9488

9589
# Common Configuration
9690
version => $version,
97-
pe_installer_source => $pe_installer_source,
9891
console_password => $console_password,
9992
dns_alt_names => $dns_alt_names,
10093
pe_conf_data => $pe_conf_data,

plans/subplans/install.pp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@
2828
# Config data to plane into pe.conf when generated on all hosts, this can be
2929
# used for tuning data etc.
3030
#
31-
# @param pe_installer_source
32-
# The URL to download the Puppet Enterprise installer media from. If not
33-
# specified, PEAdm will attempt to download PE installation media from its
34-
# standard public source. When specified, PEAdm will download directly from the
35-
# URL given.
36-
#
3731
plan peadm::subplans::install (
3832
# Standard
3933
Peadm::SingleTargetSpec $primary_host,
@@ -50,7 +44,6 @@
5044
# Common Configuration
5145
String $console_password,
5246
Peadm::Pe_version $version,
53-
Optional[Stdlib::HTTPSUrl] $pe_installer_source = undef,
5447
Array[String] $dns_alt_names = [],
5548
Hash $pe_conf_data = {},
5649

@@ -237,13 +230,8 @@
237230
)
238231
}
239232

240-
if $pe_installer_source {
241-
$pe_tarball_name = $pe_installer_source.split('/')[-1]
242-
$pe_tarball_source = $pe_installer_source
243-
} else {
244-
$pe_tarball_name = "puppet-enterprise-${version}-${platform}.tar.gz"
245-
$pe_tarball_source = "https://s3.amazonaws.com/pe-builds/released/${version}/${pe_tarball_name}"
246-
}
233+
$pe_tarball_name = "puppet-enterprise-${version}-${platform}.tar.gz"
234+
$pe_tarball_source = "https://s3.amazonaws.com/pe-builds/released/${version}/${pe_tarball_name}"
247235

248236
$upload_tarball_path = "${uploaddir}/${pe_tarball_name}"
249237

plans/upgrade.pp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
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.
1914
# @param final_agent_state
2015
# Configures the state the puppet agent should be in on infrastructure nodes
2116
# after PE is upgraded successfully.
@@ -46,7 +41,6 @@
4641

4742
# Common Configuration
4843
Optional[Peadm::Pe_version] $version = undef,
49-
Optional[Stdlib::HTTPSUrl] $pe_installer_source = undef,
5044
Optional[String] $compiler_pool_address = undef,
5145
Optional[String] $internal_compiler_a_pool_address = undef,
5246
Optional[String] $internal_compiler_b_pool_address = undef,
@@ -119,15 +113,9 @@
119113

120114
$platform = run_task('peadm::precheck', $primary_target).first['platform']
121115

122-
if $pe_installer_source {
123-
$pe_tarball_name = $pe_installer_source.split('/')[-1]
124-
$pe_tarball_source = $pe_installer_source
125-
$_version = $pe_tarball_name.split('-')[2]
126-
} else {
127-
$_version = $version
128-
$pe_tarball_name = "puppet-enterprise-${_version}-${platform}.tar.gz"
129-
$pe_tarball_source = "https://s3.amazonaws.com/pe-builds/released/${_version}/${pe_tarball_name}"
130-
}
116+
$_version = $version
117+
$pe_tarball_name = "puppet-enterprise-${_version}-${platform}.tar.gz"
118+
$pe_tarball_source = "https://s3.amazonaws.com/pe-builds/released/${_version}/${pe_tarball_name}"
131119

132120
$upload_tarball_path = "${uploaddir}/${pe_tarball_name}"
133121

0 commit comments

Comments
 (0)