diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index c99e3c3..002ab34 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -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']}"