cdn-ops/global/overlay/etc/puppet/modules/cdn/manifests/runner.pp

47 lines
1.1 KiB
ObjectPascal
Raw Normal View History

2024-10-03 18:12:59 +00:00
# Configure the SUNET CDN forgejo runner
class cdn::runner(
)
{
$runner_token = lookup({ 'name' => 'runner_token', 'default_value' => undef })
if $runner_token {
file { '/opt/forgejo-runner':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0750',
}
file { '/opt/forgejo-runner/data':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0750',
}
file { '/opt/forgejo-runner/data/seccomp.json':
ensure => file,
owner => 'root',
group => 'root',
mode => '0640',
content => template('cdn/runner/seccomp.json.erb'),
}
file { '/opt/forgejo-runner/docker_certs':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0750',
}
sunet::docker_compose { 'sunet-cdn-runner':
content => template('cdn/runner/docker-compose.yml.erb'),
service_name => 'cdn-runner',
compose_dir => '/opt/sunet-cdn/compose/runner',
compose_filename => 'docker-compose.yml',
description => 'SUNET CDN forgejo runner',
}
}
}