Skip to content

Commit 1468f95

Browse files
committed
Add replica and compiler to csr_yaml_jobs.
1 parent 58c9994 commit 1468f95

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

plans/subplans/install.pp

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,30 @@
221221
}
222222
)
223223
},
224+
background('replica-csr.yaml') || {
225+
run_plan('peadm::util::insert_csr_extension_requests', $replica_target,
226+
extension_requests => {
227+
peadm::oid('peadm_role') => 'puppet/server',
228+
peadm::oid('peadm_availability_group') => 'B'
229+
}
230+
)
231+
},
232+
background('compiler-a-csr.yaml') || {
233+
run_plan('peadm::util::insert_csr_extension_requests', $compiler_a_targets,
234+
extension_requests => {
235+
peadm::oid('pp_auth_role') => 'pe_compiler',
236+
peadm::oid('peadm_availability_group') => 'A'
237+
}
238+
)
239+
},
240+
background('compiler-b-csr.yaml') || {
241+
run_plan('peadm::util::insert_csr_extension_requests', $compiler_b_targets,
242+
extension_requests => {
243+
peadm::oid('pp_auth_role') => 'pe_compiler',
244+
peadm::oid('peadm_availability_group') => 'B'
245+
}
246+
)
247+
},
224248
background('primary-postgresql-csr.yaml') || {
225249
run_plan('peadm::util::insert_csr_extension_requests', $primary_postgresql_target,
226250
extension_requests => {
@@ -323,25 +347,6 @@
323347
"main:certname=${target.peadm::certname()}",
324348
]
325349

326-
$role_and_group =
327-
if ($target in $compiler_a_targets) {{
328-
peadm::oid('pp_auth_role') => 'pe_compiler',
329-
peadm::oid('peadm_availability_group') => 'A',
330-
}}
331-
elsif ($target in $compiler_b_targets) {{
332-
peadm::oid('pp_auth_role') => 'pe_compiler',
333-
peadm::oid('peadm_availability_group') => 'B',
334-
}}
335-
elsif ($target in $replica_target) {{
336-
peadm::oid('peadm_role') => 'puppet/server',
337-
peadm::oid('peadm_availability_group') => 'B',
338-
}}
339-
340-
# Merge extension requests with csr_attributes.yaml or create it
341-
run_plan('peadm::util::insert_csr_extension_requests', $target,
342-
extension_requests => $role_and_group
343-
)
344-
345350
# Get an agent installed and cert signed
346351
run_task('peadm::agent_install', $target,
347352
server => $primary_target.peadm::certname(),

0 commit comments

Comments
 (0)