|
39 | 39 | download_mode => $download_mode,
|
40 | 40 | code_manager_auto_configure => $code_manager_auto_configure,
|
41 | 41 | version => $version,
|
42 |
| - pe_installer_source => $pe_installer_source, |
43 | 42 | permit_unsafe_versions => $permit_unsafe_versions,
|
44 | 43 | }
|
45 | 44 |
|
46 |
| - $arch_params = |
47 |
| - case $architecture { |
| 45 | + $arch_params = case $architecture { |
48 | 46 | 'standard': {{
|
49 | 47 | primary_host => $t.filter |$n| { $n.vars['role'] == 'primary' },
|
50 | 48 | } }
|
|
76 | 74 | default: { fail('Invalid architecture!') }
|
77 | 75 | }
|
78 | 76 |
|
79 |
| - $install_result = |
80 |
| - run_plan('peadm::install', $arch_params + $common_params) |
| 77 | + if $pe_installer_source { |
| 78 | + $platform = run_task('peadm::precheck', $arch_params['primary_host']).first['platform'] |
| 79 | + $pe_tarball_name = "puppet-enterprise-${version}-${platform}.tar.gz" |
| 80 | + $upload_tarball_path = "/tmp/${pe_tarball_name}" |
| 81 | + |
| 82 | + if $download_mode == 'bolthost' { |
| 83 | + run_plan('peadm::util::retrieve_and_upload', $arch_params['primary_host'], |
| 84 | + source => $pe_installer_source, |
| 85 | + local_path => "/tmp/${pe_tarball_name}", |
| 86 | + upload_path => $upload_tarball_path, |
| 87 | + ) |
| 88 | + } else { |
| 89 | + run_task('peadm::download', $arch_params['primary_host'], |
| 90 | + source => $pe_installer_source, |
| 91 | + path => $upload_tarball_path, |
| 92 | + ) |
| 93 | + } |
| 94 | + } |
| 95 | + $install_result = run_plan('peadm::install', $arch_params + $common_params) |
81 | 96 |
|
82 | 97 | return($install_result)
|
83 | 98 | }
|
0 commit comments