Skip to content

Commit

Permalink
fix: handle undefined certname in convert_compiler_to_legacy plan
Browse files Browse the repository at this point in the history
- Updated `primary_host` to handle cases where `certname` is undefined.
- Added conditional logic to default to `$primary_target` if `certname` is undefined.
  • Loading branch information
CoMfUcIoS committed Sep 12, 2024
1 parent 1590a02 commit d6682b2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plans/convert_compiler_to_legacy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@

apply($primary_target) {
class { 'peadm::setup::node_manager_yaml':
primary_host => $primary_target.peadm::certname(),
primary_host => $primary_target.peadm::certname() ? {
undef => $primary_target,
default => $primary_target.peadm::certname(),
},
}

class { 'peadm::setup::legacy_compiler_group':
primary_host => $primary_target.peadm::certname(),
primary_host => $primary_target.peadm::certname() ? {
undef => $primary_target,
default => $primary_target.peadm::certname(),
},
internal_compiler_a_pool_address => $cluster['params']['internal_compiler_a_pool_address'],
internal_compiler_b_pool_address => $cluster['params']['internal_compiler_b_pool_address'],
require => Class['peadm::setup::node_manager_yaml'],
Expand Down

0 comments on commit d6682b2

Please sign in to comment.