Update beaker setup for xenial

Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs.

Change-Id: I46395c93b83e3a9234ca3023830c74eefc68c925
This commit is contained in:
Colleen Murphy 2017-06-11 21:15:47 +02:00
parent 7df7a1dddb
commit a9d0f492ba
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,10 @@
HOSTS:
ubuntu-16.04-amd64:
roles:
- master
platform: ubuntu-16.04-amd64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false

View File

@ -1,7 +1,15 @@
require 'beaker-rspec'
hosts.each do |host|
install_puppet
# puppet 3 isn't available from apt.puppetlabs.com so install it from the Xenial repos
on host, "which apt-get && apt-get install puppet -y", { :acceptable_exit_codes => [0,1] }
# otherwise use the beaker helpers to install the yum.puppetlabs.com repo and puppet
r = on host, "which yum", { :acceptable_exit_codes => [0,1] }
if r.exit_code == 0
install_puppet
end
add_platform_foss_defaults(host, 'unix')
on host, "mkdir -p #{host['distmoduledir']}"
end