Puppet Plan: complyadm::validate
- Defined in:
- plans/validate.pp
Overview
Runs all validate plans together to verify installation was successful and logs results.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'plans/validate.pp', line 8
plan complyadm::validate(
Complyadm::Config $config = complyadm::config(),
) {
run_plan('complyadm::check_bolt_version')
without_default_logging() || {
$images_result = run_plan('complyadm::validate::images', config => $config)
out::message(complyadm::checks::format_results('images: verifying images are present', $images_result))
$runtime_result = run_plan('complyadm::validate::runtime', config => $config)
out::message(complyadm::checks::format_results('runtime: verifying installed runtimes match', $runtime_result))
$database_result = run_plan('complyadm::validate::database', config => $config)
out::message(complyadm::checks::format_results('database: verifying database access', $database_result))
$results = [$images_result, $runtime_result, $database_result]
out::message(complyadm::checks::format_summary($results))
$aggregated_results = complyadm::checks::aggregate_results($results)
if(length($aggregated_results[failed]) > 0) {
fail_plan('One or more validation checks did not pass', 'comply/error')
}
return $aggregated_results
}
}
|