Puppet Plan: cd4peadm::read_version_file_from_target

Defined in:
plans/read_version_file_from_target.pp

Summary

Attempt to read the app version file from specified targets

Overview

Parameters:

  • targets (Array[TargetSpec])

    The targets from which to read the version

Returns:

  • the ResultSet from loading the file. Might contain errors.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'plans/read_version_file_from_target.pp', line 8

plan cd4peadm::read_version_file_from_target(
  Array[TargetSpec] $targets,
) {
  $version_from_file_result = without_default_logging() || {
    run_command(
      "cat ${cd4peadm::version_file_path()}",
      $targets,
      { '_run_as' => 'root', '_catch_errors' => true }
    )
  }
  return($version_from_file_result)
}