24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'manifests/init.pp', line 24
class github_actions_runner (
String[1] $personal_access_token = 'PAT',
Enum['present', 'absent'] $ensure = 'present',
Stdlib::Absolutepath $base_dir_name = '/some_dir/actions-runner',
String[1] $package_name = $facts['os']['architecture'] ? { /x86_64|amd64/ => 'actions-runner-linux-x64', 'aarch64' => 'actions-runner-linux-arm64' },
String[1] $package_ensure = '2.319.1',
String[1] $repository_url = 'https://github.com/actions/runner/releases/download',
String[1] $user = 'root',
String[1] $group = 'root',
Hash[String[1], Hash] $instances = {},
String[1] $github_domain = 'https://github.com',
String[1] $github_api = 'https://api.github.com',
Optional[String[1]] $enterprise_name = undef,
Optional[String[1]] $org_name = undef,
Optional[String[1]] $http_proxy = undef,
Optional[String[1]] $https_proxy = undef,
Optional[String[1]] $no_proxy = undef,
Boolean $disable_update = false,
Optional[Array[String]] $path = undef,
Optional[Hash[String, String]] $env = undef,
) {
$root_dir = "${github_actions_runner::base_dir_name}-${github_actions_runner::package_ensure}"
$ensure_directory = $github_actions_runner::ensure ? {
'present' => directory,
'absent' => absent,
}
file { $github_actions_runner::root_dir:
ensure => $ensure_directory,
mode => '0644',
owner => $github_actions_runner::user,
group => $github_actions_runner::group,
force => true,
}
create_resources(github_actions_runner::instance, $github_actions_runner::instances)
}
|