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
|
# File 'manifests/init.pp', line 8
class configvault (
String $bucket,
String $version,
String $binfile,
String $user,
) {
$kernel = downcase($facts['kernel'])
$arch = $facts['os']['architecture'] ? {
'x86_64' => 'amd64',
'amd64' => 'amd64',
'arm64' => 'arm64',
'aarch64' => 'arm64',
'arm' => 'arm',
'armv7l' => 'arm',
default => 'error',
}
$filename = "configvault_${kernel}_${arch}"
$url = "https://github.com/akerl/configvault/releases/download/${version}/${filename}"
file { $binfile:
ensure => file,
source => $url,
mode => '0755',
owner => 'root',
group => 'root',
}
}
|