Skip to content

Commit

Permalink
Merge pull request #37 from ekohl/change-ubuntu-package-name
Browse files Browse the repository at this point in the history
Always use puppet-agent for Debian 12+ & Ubuntu 23.04+
  • Loading branch information
ekohl authored Oct 16, 2023
2 parents 8af9ce9 + fc66aaa commit ae15672
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DESC
task :acceptance do
hosts = {
aio: %w[centos7 centos8 debian10 debian11],
foss: %w[debian10 debian11],
foss: %w[debian10 debian11 debian12 fedora37 fedora38],
}
default_hosts = hosts.map { |type, h| h.map { |host| "#{host}-64{type=#{type}}" }.join('-') }.join('-')
hosts = ENV['BEAKER_HOSTS'] || default_hosts
Expand Down
8 changes: 7 additions & 1 deletion lib/beaker_puppet_helpers/install_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,16 @@ def self.install_puppet_release_repo_on(host, collection = 'puppet', nightly: fa
# @return [String] The Puppet package name
def self.puppet_package_name(host, prefer_aio: true)
case host['packaging_platform'].split('-', 3).first
when /el|fedora|sles|cisco_|debian|ubuntu/
when 'debian'
# 12 started to ship puppet-agent with puppet as a legacy package
prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 12 ? 'puppet-agent' : 'puppet'
when /el|fedora|sles|cisco_/
prefer_aio ? 'puppet-agent' : 'puppet'
when /freebsd/
'sysutils/puppet'
when 'ubuntu'
# 23.04 started to ship puppet-agent with puppet as a legacy package
prefer_aio || host['packaging_platform'].split('-', 3)[1].to_i >= 2304 ? 'puppet-agent' : 'puppet'
else
'puppet'
end
Expand Down

0 comments on commit ae15672

Please sign in to comment.