Skip to content

Commit

Permalink
add support for arm64 Debian repos
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Nov 7, 2023
1 parent b24756a commit ef0fd80
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@

if ($facts['os']['distro']['id'] == 'Raspbian') {
$operatingsystem = 'raspbian'
} elsif ($facts['os']['architecture'] in ['arm64', 'aarch64']) {
# arm64 is the Debian name, but some facter versions report aarch64 instead
$operatingsystem = "${downcase($facts['os']['name'])}-arm64"
} else {
$operatingsystem = downcase($facts['os']['name'])
}
Expand Down
11 changes: 11 additions & 0 deletions spec/classes/repo_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

require 'deep_merge'
require 'spec_helper'

describe 'zabbix::repo' do
Expand Down Expand Up @@ -45,6 +46,16 @@
it { is_expected.to contain_apt__source('zabbix').with_location('http://repo.zabbix.com/zabbix/5.0/debian/') }
end
end

%w[arm64 aarch64].each do |arch|
context "on #{arch}" do
let :facts do
facts.deep_merge(os: { architecture: arch })
end

it { is_expected.to contain_apt__source('zabbix').with_location("http://repo.zabbix.com/zabbix/6.0/#{facts[:os]['name'].downcase}-arm64/") }
end
end
when 'RedHat'

it { is_expected.to compile.with_all_deps }
Expand Down

0 comments on commit ef0fd80

Please sign in to comment.