Puppet Plan: complyadm::install::runtime

Defined in:
plans/install/runtime.pp

Overview

Installs the desired runtime on all infrastructure targets.

For a list of supported runtimes, @see Complyadm::Runtime

Parameters:

  • config (Complyadm::Config)

    Complyadm::Config object with all config options

Returns:

  • ResultSet from catalog application



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'plans/install/runtime.pp', line 10

plan complyadm::install::runtime(
  Complyadm::Config $config,
) {
  apply_prep($config['all_targets'], { '_run_as' => 'root' })
  $runtime = $config['runtime']

  $apply_options = {
    '_run_as' => 'root',
    '_description' => "install ${runtime}",
  }

  if($runtime == 'docker') {
    return apply($config['all_targets'], $apply_options) {
      include docker
    }
  } elsif($runtime == 'podman') {
    return apply($config['all_targets'], $apply_options) {
      package { ['podman', 'podman-plugins']:
        ensure => present,
      }
    }
  } else {
    fail_plan("${runtime} is not supported. Please update the configuration to be either docker or podman", 'comply/error')
  }
}