Skip to content

Commit dac38e5

Browse files
author
petergmurphy
committed
Migrate to new method for legacy compiler checks
1 parent 3b39b69 commit dac38e5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

plans/upgrade.pp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,18 @@
140140
$memo + { $result.target.peadm::certname => $result['extensions'] }
141141
}
142142

143-
$compiler_missing_legacy_targets = $cert_extensions_temp.filter |$name,$exts| {
144-
($name in $compiler_targets.map |$t| { $t.name }) and (peadm::oid('peadm_legacy_compiler') in $exts and $exts[peadm::oid('peadm_legacy_compiler')] == undef)
143+
# Add legacy compiler role to compilers that are missing it
144+
$legacy_compiler_targets = $cert_extensions_temp.filter |$name,$exts| {
145+
($name in $compiler_targets.map |$t| { $t.name }) and
146+
($exts[peadm::oid('peadm_legacy_compiler')] != undef) and
147+
($exts[peadm::oid('peadm_legacy_compiler')] == 'true') and
148+
($exts['pp_auth_role'] != 'pe_compiler_legacy')
145149
}.keys
146150

147-
run_plan('peadm::modify_certificate', $compiler_missing_legacy_targets,
151+
run_plan('peadm::modify_certificate', $legacy_compiler_targets,
148152
primary_host => $primary_target,
149153
add_extensions => {
150-
peadm::oid('peadm_legacy_compiler') => 'false',
154+
'pp_auth_role' => 'pe_compiler_legacy',
151155
},
152156
)
153157

0 commit comments

Comments
 (0)