Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wait function during install #80

Merged
merged 1 commit into from Mar 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions plans/action/install.pp
Expand Up @@ -342,6 +342,19 @@
}

run_task('peadm::puppet_runonce', $master_target)

# The puppetserver might be in the middle of a restart so we check the status by calling
# the api and ensuring the puppetserver is taking requests.
ctrl::do_until('limit' => 10) || {
$pe_status = run_task('peadm::check_status', $master_target, service => 'pe-master')
if ($pe_status.first['state'] != 'running') {
ctrl::sleep(5)
false
} else {
true
}
}

run_task('peadm::puppet_runonce', $all_targets - $master_target)

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