Skip to content

Commit a826147

Browse files
author
Neil Anderson
committed
Adding check for mmissing legacy flag
If missing, adding leagcy flase to compilers
1 parent 2aaacfc commit a826147

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

plans/upgrade.pp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,22 @@
135135

136136
peadm::assert_supported_pe_version($_version, $permit_unsafe_versions)
137137

138+
# Gather certificate extension information from all systems
139+
$cert_extensions_temp = run_task('peadm::cert_data', $all_targets).reduce({}) |$memo,$result| {
140+
$memo + { $result.target.peadm::certname => $result['extensions'] }
141+
}
142+
143+
$compiler_missing_legacy_targets = $cert_extensions_temp.filter |$name,$exts| {
144+
($name in $compiler_targets.map |$t| { $t.name }) and ($exts[peadm::oid('peadm_legacy_compiler')] == undef)
145+
}.keys
146+
147+
run_plan('peadm::modify_certificate', $compiler_missing_legacy_targets,
148+
primary_host => $primary_target,
149+
add_extensions => {
150+
peadm::oid('peadm_legacy_compiler') => 'false',
151+
},
152+
)
153+
138154
# Gather certificate extension information from all systems
139155
$cert_extensions = run_task('peadm::cert_data', $all_targets).reduce({}) |$memo,$result| {
140156
$memo + { $result.target.peadm::certname => $result['extensions'] }

0 commit comments

Comments
 (0)