Fix beaker-rspec tests for centos7

We recently made the epel repository disabled by default, which was
where we were installing puppet from. Since the only reason we weren't
using the beaker functions to install puppet was because of Xenial, we
can just go back to using them for CentOS.

Change-Id: Ib3b2b0b69900313643344908bbacaa9bd03ade93
This commit is contained in:
Colleen Murphy 2017-04-13 22:37:52 +02:00
parent c2e48cefb9
commit d6869b436b
1 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,11 @@ hosts.each do |host|
# 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] }
on host, "which yum && yum 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']}"