Skip to content

Commit 6e6518a

Browse files
committed
fix: handle undefined certname in convert_compiler_to_legacy plan
- Updated `primary_host` to handle cases where `certname` is undefined. - Added conditional logic to default to `$primary_target` if `certname` is undefined.
1 parent 1034e82 commit 6e6518a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: plans/convert_compiler_to_legacy.pp

+8-2
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,17 @@
100100

101101
apply($primary_target) {
102102
class { 'peadm::setup::node_manager_yaml':
103-
primary_host => $primary_target.peadm::certname(),
103+
primary_host => $primary_target.peadm::certname() ? {
104+
undef => $primary_target,
105+
default => $primary_target.peadm::certname(),
106+
},
104107
}
105108

106109
class { 'peadm::setup::legacy_compiler_group':
107-
primary_host => $primary_target.peadm::certname(),
110+
primary_host => $primary_target.peadm::certname() ? {
111+
undef => $primary_target,
112+
default => $primary_target.peadm::certname(),
113+
},
108114
internal_compiler_a_pool_address => $cluster['params']['internal_compiler_a_pool_address'],
109115
internal_compiler_b_pool_address => $cluster['params']['internal_compiler_b_pool_address'],
110116
require => Class['peadm::setup::node_manager_yaml'],

0 commit comments

Comments
 (0)