File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 61
61
out::message(" Operating in ${operating_mode} mode" )
62
62
63
63
if $operating_mode == ' init' {
64
- # if we are doing a migration then we need to assign the new node to group A
65
- if $is_migration {
66
- $avail_group_letter = ' A'
67
- } else {
68
- # If no other PSQL node then match primary group letter
69
- $avail_group_letter = peadm::flatten_compact($roles [' server' ].map |$k ,$v | {
70
- if $v == $primary_host {
71
- $k
72
- }
73
- })[0]
64
+ # If no other PSQL node then match primary group letter
65
+ $calculated_group_letter = peadm::flatten_compact($roles [' server' ].map |$k ,$v | {
66
+ if $v == $primary_host {
67
+ $k
68
+ }
69
+ })[0]
70
+ $avail_group_letter = $calculated_group_letter ? {
71
+ undef => $is_migration ? { true => ' A' , default => undef },
72
+ default => $calculated_group_letter ,
74
73
}
75
74
# Assume PuppetDB backend hosted on Primary if in init mode
76
75
$source_db_host = $primary_host
You can’t perform that action at this time.
0 commit comments