Skip to content

Commit

Permalink
Cleanup architecture selection, dont fail on unknown architecture
Browse files Browse the repository at this point in the history
prometheus exporters are built for so many architectures, chances are
high that a platform we're not aware of works out of the box. We
should not block this.
  • Loading branch information
bastelfreak committed Nov 8, 2023
1 parent 375993e commit 722b975
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,13 @@
Optional[Enum['none', 'http', 'https', 'ftp']] $proxy_type = undef,
) {
case $arch {
'x86_64', 'amd64': { $real_arch = 'amd64' }
'i386': { $real_arch = '386' }
'aarch64': { $real_arch = 'arm64' }
'armv7l': { $real_arch = 'armv7' }
'armv6l': { $real_arch = 'armv6' }
'armv5l': { $real_arch = 'armv5' }
'ppc64le': { $real_arch = 'ppc64le' }
default: {
fail("Unsupported kernel architecture: ${arch}")
}
'x86_64': { $real_arch = 'amd64' }
'i386': { $real_arch = '386' }
'aarch64': { $real_arch = 'arm64' }
'armv7l': { $real_arch = 'armv7' }
'armv6l': { $real_arch = 'armv6' }
'armv5l': { $real_arch = 'armv5' }
default: { $real_arch = $arch }
}

if $manage_prometheus_server {
Expand Down

0 comments on commit 722b975

Please sign in to comment.