|
49 | 49 | run_task('peadm::agent_install', $compiler_target,
|
50 | 50 | server => $primary_target.peadm::certname(),
|
51 | 51 | install_flags => $dns_alt_names_flag + [
|
| 52 | + '--puppet-service-ensure', 'stopped', |
52 | 53 | "extension_requests:${peadm::oid('pp_auth_role')}=pe_compiler",
|
53 | 54 | "extension_requests:${peadm::oid('peadm_availability_group')}=${avail_group_letter}",
|
54 | 55 | "main:certname=${compiler_target.peadm::certname()}",
|
55 | 56 | ],
|
56 | 57 | )
|
57 | 58 |
|
58 |
| - # On <compiler-host>, run the puppet agent |
59 |
| - # ignoring errors to simplify logic |
60 |
| - run_task('peadm::puppet_runonce', $compiler_target, {'_catch_errors' => true}) |
61 |
| - |
62 | 59 | # If necessary, manually submit a CSR
|
63 | 60 | # ignoring errors to simplify logic
|
64 | 61 | run_task('peadm::submit_csr', $compiler_target, {'_catch_errors' => true})
|
65 | 62 |
|
66 | 63 | # On primary, if necessary, sign the certificate request
|
67 | 64 | run_task('peadm::sign_csr', $primary_target, { 'certnames' => [$compiler_target.peadm::certname()] } )
|
68 | 65 |
|
69 |
| - # On <compiler-host>, run the puppet agent |
70 |
| - run_task('peadm::puppet_runonce', $compiler_target) |
71 |
| - |
72 | 66 | # If there was already a signed cert, force the certificate extensions we want
|
73 | 67 | # TODO: update peadm::util::add_cert_extensions to take care of dns alt names
|
74 | 68 | run_plan('peadm::util::add_cert_extensions', $compiler_target,
|
|
79 | 73 | },
|
80 | 74 | )
|
81 | 75 |
|
| 76 | + # On <compiler-host>, run the puppet agent |
| 77 | + run_task('peadm::puppet_runonce', $compiler_target) |
| 78 | + |
82 | 79 | # On <primary_postgresql_host> run the puppet agent
|
83 | 80 | run_task('peadm::puppet_runonce', $primary_postgresql_target)
|
84 | 81 |
|
85 | 82 | # On <primary_postgresql_host> start puppet.service
|
86 |
| - run_command('systemctl start puppet.service', $primary_postgresql_target) |
| 83 | + run_command('systemctl start puppet.service', peadm::flatten_compact([ |
| 84 | + $primary_postgresql_target, |
| 85 | + $compiler_target, |
| 86 | + ]) |
87 | 87 |
|
88 | 88 | return("Adding or replacing compiler ${$compiler_target.peadm::certname()} succeeded.")
|
89 | 89 |
|
|
0 commit comments