Skip to content

Commit e67d0b3

Browse files
committed
feat(convert_compiler_to_legacy): gather certificate extension information
- Updated `puppetdb_host` to include both internal compiler pool addresses. - Modified `convert_compiler_to_legacy` plan to gather certificate extension information from legacy targets using the `peadm::cert_data` task. - Adjusted filtering of legacy compiler targets based on availability group using the gathered certificate data. This enhancement improves the accuracy of the conversion process by ensuring that the correct certificate data is used.
1 parent 7533166 commit e67d0b3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

manifests/setup/legacy_compiler_group.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
],
1717
classes => {
1818
'puppet_enterprise::profile::master' => {
19-
'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ },
19+
'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ },
2020
'puppetdb_port' => [8081],
2121
},
2222
},

plans/convert_compiler_to_legacy.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$replica_target = peadm::get_targets($replica_host, 1)
2323
$primary_postgresql_target = peadm::get_targets($primary_postgresql_host, 1)
2424
$replica_postgresql_target = peadm::get_targets($replica_postgresql_host, 1)
25-
$compiler_targets = peadm::get_targets($compiler_hosts)
25+
$compiler_targets = peadm::get_targets($compiler_hosts) - $convert_legacy_compiler_targets
2626
$legacy_targets = peadm::get_targets($legacy_compilers) + $convert_legacy_compiler_targets
2727

2828
$all_targets = peadm::flatten_compact([
@@ -46,7 +46,7 @@
4646

4747
if $arch['disaster-recovery'] {
4848
# Gather certificate extension information from all systems
49-
$cert_extensions = run_task('peadm::cert_data', $all_targets).reduce({}) |$memo,$result| {
49+
$cert_extensions = run_task('peadm::cert_data', $legacy_targets).reduce({}) |$memo,$result| {
5050
$memo + { $result.target.peadm::certname => $result['extensions'] }
5151
}
5252
$legacy_compiler_a_targets = $convert_legacy_compiler_targets.filter |$index,$target| {

0 commit comments

Comments
 (0)