Skip to content

Commit 5d20ce7

Browse files
author
mchllweeks
authored
Merge pull request #46 from puppetlabs/ubuntu-insecure-repos2
(BKR-1462) Allow unsigned apt repositories for Ubuntu 18.04 hosts
2 parents 7a0ea66 + 46dc2ba commit 5d20ce7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/beaker-puppet/install_utils/foss_utils.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,10 @@ def install_puppet_agent_dev_repo_on( hosts, global_opts )
11771177
if arch== 's390x' || host['hypervisor'] == 'ec2'
11781178
logger.trace("#install_puppet_agent_dev_repo_on: unsupported host #{host} for repo detected. using dev package")
11791179
else
1180+
if variant =~ /^ubuntu$/ && version.split('.').first.to_i >= 18
1181+
# Allow the use of unsigned repos with Ubuntu 18.04+
1182+
on host, "echo 'Acquire::AllowInsecureRepositories \"true\";' > /etc/apt/apt.conf.d/90insecure"
1183+
end
11801184
install_puppetlabs_dev_repo( host, 'puppet-agent', puppet_agent_version, nil, opts )
11811185
host.install_package('puppet-agent')
11821186
logger.trace("#install_puppet_agent_dev_repo_on: install_puppetlabs_dev_repo finished")

0 commit comments

Comments
 (0)