Skip to content

Commit e235324

Browse files
committed
feat(convert_compiler_to_legacy): gather certificate extension information
- Added steps to apply `peadm::setup::legacy_compiler_group` class with internal compiler pool addresses. - Ensured `primary_host` is set correctly based on the primary target's certname. - Removed redundant application of `peadm::setup::node_manager_yaml` and `peadm::setup::legacy_compiler_group` classes. This enhancement ensures that the correct certificate data is used, improving the accuracy of the conversion process.
1 parent fdac866 commit e235324

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

plans/convert_compiler_to_legacy.pp

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
default => $primary_target.peadm::certname(),
2121
},
2222
}
23+
24+
class { 'peadm::setup::legacy_compiler_group':
25+
primary_host => $primary_target.peadm::certname() ? {
26+
undef => $primary_target,
27+
default => $primary_target.peadm::certname(),
28+
},
29+
internal_compiler_a_pool_address => $cluster['params']['internal_compiler_a_pool_address'],
30+
internal_compiler_b_pool_address => $cluster['params']['internal_compiler_b_pool_address'],
31+
require => Class['peadm::setup::node_manager_yaml'],
32+
}
2333
}
2434

2535
$replica_host = getvar('cluster.params.replica_host')
@@ -123,25 +133,6 @@
123133
run_command('puppet resource service pe-puppetdb ensure=stopped enable=false', $convert_legacy_compiler_targets)
124134
}
125135

126-
apply($primary_target) {
127-
class { 'peadm::setup::node_manager_yaml':
128-
primary_host => $primary_target.peadm::certname() ? {
129-
undef => $primary_target,
130-
default => $primary_target.peadm::certname(),
131-
},
132-
}
133-
134-
class { 'peadm::setup::legacy_compiler_group':
135-
primary_host => $primary_target.peadm::certname() ? {
136-
undef => $primary_target,
137-
default => $primary_target.peadm::certname(),
138-
},
139-
internal_compiler_a_pool_address => $cluster['params']['internal_compiler_a_pool_address'],
140-
internal_compiler_b_pool_address => $cluster['params']['internal_compiler_b_pool_address'],
141-
require => Class['peadm::setup::node_manager_yaml'],
142-
}
143-
}
144-
145136
run_task('peadm::puppet_runonce', $convert_legacy_compiler_targets)
146137
run_task('peadm::puppet_runonce', $compiler_targets)
147138
run_task('peadm::puppet_runonce', $primary_target)

0 commit comments

Comments
 (0)