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