From 147b2d030e2f85b29014ff3f34a56385c0c8caa1 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Thu, 30 May 2024 16:39:34 -0700 Subject: [PATCH] Install puppet-agent directly on Ubuntu 24.04 Ubuntu 24.04 ships a puppet-agent 8 package which uses different paths than ours. To ensure we install the correct puppet-agent package, install the specific puppet-agent artifact. --- lib/beaker-puppet/install_utils/puppet5.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/beaker-puppet/install_utils/puppet5.rb b/lib/beaker-puppet/install_utils/puppet5.rb index ef5d6c3..2c4ce7f 100644 --- a/lib/beaker-puppet/install_utils/puppet5.rb +++ b/lib/beaker-puppet/install_utils/puppet5.rb @@ -217,7 +217,12 @@ def install_from_build_data_url(project_name, sha_yaml_url, local_hosts = nil) install_targets.each do |host| artifact_url, repoconfig_url = host_urls(host, build_details, base_url) - if repoconfig_url.nil? + if host.platform.variant == 'ubuntu' && host.platform.version.to_f >= 24.04 + # install the specific artifact we built, not based on how its repos are configured + tmp_file = host.tmpfile('puppet-agent') + on(host, "curl -L --output #{tmp_file} #{artifact_url}") + host.install_local_package(tmp_file) + elsif repoconfig_url.nil? install_artifact_on(host, artifact_url, project_name) else install_repo_configs_on(host, repoconfig_url)