Puppet Plan: complyadm::check_bolt_version

Defined in:
plans/check_bolt_version.pp

Overview

Checks that we are using a supported Bolt version.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'plans/check_bolt_version.pp', line 4

plan complyadm::check_bolt_version() {
  without_default_logging () || {
    # We peform the Bolt version check and architecture checks first and we fail fast on them
    # because the wrong Bolt version could cause problems we don't want to have to deal with and
    # if there's something wrong with their infra config, we don't want to go and install puppet
    # on a bunch of machines if we don't need/have/want to
    $bolt_result = run_plan('complyadm::preflight::bolt')
    out::message(complyadm::checks::format_results('bolt: checking for supported version', $bolt_result))

    if(length($bolt_result['failed']) > 0) {
      out::message(complyadm::checks::format_summary([$bolt_result]))
      fail_plan($bolt_result['failed'][0], 'comply/error')
    }
  }
}