puppet-prod/modules/droneci/manifests/runner.pp
Ben Vincent d79a5de17b feat: add droneci runner
- ensure /data and docker are available
- add droneci runner configuration
2024-08-25 02:14:35 +10:00

25 lines
682 B
Puppet

class droneci::runner (
Hash $env_vars = {},
String $docker_image = 'drone/drone-runner-docker:1',
Array[String] $ports = [],
Array[String] $volumes = [],
Stdlib::Absolutepath $env_file = '/etc/sysconfig/droneci_runner',
) {
# Create the environment file from a template
file { $env_file:
ensure => file,
content => template('droneci/droneci_env.erb'),
mode => '0644',
}
# Define the systemd service for Drone CI runner
systemd::unit_file { 'droneci-runner.service':
ensure => present,
content => template('droneci/droneci_runner_service.erb'),
enable => true,
active => true,
subscribe => File[$env_file],
}
}