4
5
6
7
8
9
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
35
36
37
38
39
40
41
42
43
44
|
# File 'manifests/component/scarpy.pp', line 4
class complyadm::component::scarpy (
Complyadm::Config::Comply_scarpy $config,
) {
$container = $config['container']
$scarpy_env = '/etc/puppetlabs/comply/scarpy.env'
file { $scarpy_env:
ensure => file,
owner => 'root',
group => 'root',
seltype => 'container_file_t',
show_diff => false,
content => epp('complyadm/comply_env.epp', { env_vars => $container['env_vars'] }),
notify => Complyadm::Runtime::Run[$container['name']],
}
# copy of file is maintained so that scarpy restarted if ca crt updated
$ca_cert_scarpy = '/etc/puppetlabs/comply/pe_certs/.ca.crt.scarpy'
file { $ca_cert_scarpy:
ensure => file,
content => $config['ca_crt'],
notify => Complyadm::Runtime::Run[$container['name']],
}
complyadm::runtime::run { $container['name']:
runtime => $container['runtime'],
install_runtime => $container['install_runtime'],
image => $container['image'],
net => $container['net'],
extra_parameters => $container['extra_parameters'],
ports => $container['ports'],
pull_on_start => false,
env_file => [$scarpy_env],
require => [File[$scarpy_env]],
volumes => [
'benchmarks:/Assessor-CLI',
'/etc/puppetlabs/comply/pe_certs:/certs',
],
after => $container['after'],
}
}
|