]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Update spec_helper for more consistency
authorMorgan Haskel <morgan@puppetlabs.com>
Thu, 28 Aug 2014 22:30:39 +0000 (18:30 -0400)
committerMorgan Haskel <morgan@puppetlabs.com>
Thu, 28 Aug 2014 22:30:39 +0000 (18:30 -0400)
spec/spec_helper_acceptance.rb

index e9ccc68fd6569cf211f5bf8fa56135210b828197..53c1661431e4822565012ffe193f564ed78200fd 100755 (executable)
@@ -4,16 +4,15 @@ require 'beaker-rspec'
 UNSUPPORTED_PLATFORMS = []
 
 unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
-  if hosts.first.is_pe?
-    install_pe
-    on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d'
-  else
-    install_puppet
-    on hosts, 'mkdir -p /etc/facter/facts.d'
-    on hosts, '/bin/touch /etc/puppet/hiera.yaml'
-  end
+  # This will install the latest available package on el and deb based
+  # systems fail on windows and osx, and install via gem on other *nixes
+  foss_opts = { :default_action => 'gem_install' }
+
+  if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
+
   hosts.each do |host|
     on host, "mkdir -p #{host['distmoduledir']}"
+    on host, "/bin/touch #{default['puppetpath']}/hiera.yaml"
   end
 end