Skip to content

Commit f55d6da

Browse files
authored
Merge pull request #80 from nwops/wait
Add wait function during install
2 parents 8916d5f + 77ee1e2 commit f55d6da

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

plans/action/install.pp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,19 @@
331331
}
332332

333333
run_task('peadm::puppet_runonce', $master_target)
334+
335+
# The puppetserver might be in the middle of a restart so we check the status by calling
336+
# the api and ensuring the puppetserver is taking requests.
337+
ctrl::do_until('limit' => 10) || {
338+
$pe_status = run_task('peadm::check_status', $master_target, service => 'pe-master')
339+
if ($pe_status.first['state'] != 'running') {
340+
ctrl::sleep(5)
341+
false
342+
} else {
343+
true
344+
}
345+
}
346+
334347
run_task('peadm::puppet_runonce', $all_targets - $master_target)
335348

336349
return("Installation of Puppet Enterprise ${arch['architecture']} succeeded.")

0 commit comments

Comments
 (0)