Puppet Function: complyadm::images::inspect
- Defined in:
-
functions/images/inspect.pp
- Function type:
- Puppet Language
Overview
complyadm::images::inspect(String[1] $image_name, TargetSpec $targets, Optional[Hash] $opts = undef, Optional[Complyadm::Runtime] $runtime = 'docker') ⇒ ResultSet
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'functions/images/inspect.pp', line 12
function complyadm::images::inspect(
String[1] $image_name,
TargetSpec $targets,
Optional[Hash] $opts = undef,
Optional[Complyadm::Runtime] $runtime = 'docker',
) >> ResultSet {
$cmd_opts = $opts ? {
undef => { '_run_as' => 'root', '_catch_errors' => true, },
default => $opts,
}
without_default_logging() || {
$image_inspect_results = run_command(
"${runtime} image inspect ${image_name} --format '{{ json . }}' 2> /dev/null",
$targets,
$cmd_opts,
)
}
}
|