Skip to content

Commit 87d67b2

Browse files
mhashizumekenyon
authored andcommitted
acceptance/helpers.rb: add signed-by to apt sources.list
1 parent 30505fb commit 87d67b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

acceptance/helpers.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,15 @@ def set_up_initial_agent_on(host, initial_package_version_or_collection)
235235
end
236236

237237
install_puppet_agent_on(host, agent_install_options)
238+
239+
# beaker-puppet doesn't add signing information to the apt source list, but this module does.
240+
# This discrepancy causes apt to error, so we manually add signing info.
241+
if %r{debian|ubuntu}.match?(host['platform'])
242+
step '(Agent) Add apt signing information' do
243+
on(host, "sed -e 's/^deb http/deb [signed-by=\\/etc\\/apt\\/keyrings\\/GPG-KEY-puppet-20250406.asc] http/' /etc/apt/sources.list.d/puppet*.list -i")
244+
end
245+
end
246+
238247
teardowns << -> do
239248
remove_installed_agent(host)
240249
end

0 commit comments

Comments
 (0)