Puppet Plan: complyadm::install::download_images

Defined in:
plans/install/download_images.pp

Overview

Ensures that this version of Comply’s application images are on all infra targets.

Parameters:

  • config (Complyadm::Config)

    Complyadm::Config config object from hiera

Returns:

  • This plan does not return anything



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'plans/install/download_images.pp', line 8

plan complyadm::install::download_images(
  Complyadm::Config $config,
) {
  $runtime = $config['runtime']

  $config['roles'].each |$role, $role_info| {
    $targets_by_role = $role_info['targets']
    $role_info['services'].each |$name, $service| {
      $image_name = $service['container']['image']

      out::message("Pulling Image '${image_name}'...")
      run_command(
        "${runtime} pull ${image_name}",
        $targets_by_role,
        '_run_as' => 'root'
      )
    }
  }
}