Skip to content

Commit

Permalink
install_test_cluster: Download custom PE archive before calling peadm
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Nov 4, 2024
1 parent b0822dd commit 2ee2264
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions spec/acceptance/peadm_spec/plans/install_test_cluster.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@
download_mode => $download_mode,
code_manager_auto_configure => $code_manager_auto_configure,
version => $version,
pe_installer_source => $pe_installer_source,
permit_unsafe_versions => $permit_unsafe_versions,
}

$arch_params =
case $architecture {
$arch_params = case $architecture {
'standard': {{
primary_host => $t.filter |$n| { $n.vars['role'] == 'primary' },
} }
Expand Down Expand Up @@ -76,8 +74,25 @@
default: { fail('Invalid architecture!') }
}

$install_result =
run_plan('peadm::install', $arch_params + $common_params)
if $pe_installer_source {
$platform = run_task('peadm::precheck', $arch_params['primary_host']).first['platform']
$pe_tarball_name = "puppet-enterprise-${version}-${platform}.tar.gz"
$upload_tarball_path = "/tmp/${pe_tarball_name}"

if $download_mode == 'bolthost' {
run_plan('peadm::util::retrieve_and_upload', $arch_params['primary_host'],
source => $pe_installer_source,
local_path => "/tmp/${pe_tarball_name}",
upload_path => $upload_tarball_path,
)
} else {
run_task('peadm::download', $arch_params['primary_host'],
source => $pe_installer_source,
path => $upload_tarball_path,
)
}
}
$install_result = run_plan('peadm::install', $arch_params + $common_params)

return($install_result)
}

0 comments on commit 2ee2264

Please sign in to comment.