|
4 | 4 | UNSUPPORTED_PLATFORMS = []
|
5 | 5 |
|
6 | 6 | unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
|
7 |
| - # This will install the latest available package on el and deb based |
8 |
| - # systems fail on windows and osx, and install via gem on other *nixes |
9 |
| - foss_opts = { :default_action => 'gem_install' } |
10 |
| - |
11 |
| - if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end |
12 |
| - |
13 |
| - hosts.each do |host| |
14 |
| - on host, "mkdir -p #{host['distmoduledir']}" |
15 |
| - on host, "/bin/touch #{host['puppetpath']}/hiera.yaml" |
| 7 | + if hosts.first.is_pe? |
| 8 | + install_pe |
| 9 | + hosts.each do |host| |
| 10 | + if host['platform'] !~ /windows/i |
| 11 | + on host, 'mkdir -p /etc/puppetlabs/facter/facts.d' |
| 12 | + end |
| 13 | + end |
| 14 | + else |
| 15 | + foss_opts = {:default_action => 'gem_install'} |
| 16 | + if ENV['PUPPET_VERSION'] |
| 17 | + foss_opts[:version] = ENV['PUPPET_VERSION'] |
| 18 | + end |
| 19 | + install_puppet foss_opts |
| 20 | + hosts.each do |host| |
| 21 | + if host['platform'] !~ /windows/i |
| 22 | + on host, 'mkdir -p /etc/facter/facts.d' |
| 23 | + on host, '/bin/touch /etc/puppet/hiera.yaml' |
| 24 | + on host, "mkdir -p #{host['distmoduledir']}" |
| 25 | + end |
| 26 | + end |
16 | 27 | end
|
17 | 28 | end
|
18 | 29 |
|
|
29 | 40 | default[:default_apply_opts] ||= {}
|
30 | 41 | default[:default_apply_opts].merge!({:parser => 'future'})
|
31 | 42 | end
|
32 |
| - hosts.each do |host| |
33 |
| - if host['platform'] !~ /windows/i |
34 |
| - copy_root_module_to(host, :source => proj_root, :module_name => 'stdlib') |
35 |
| - end |
36 | 43 |
|
37 |
| - end |
38 |
| - hosts.each do |host| |
39 |
| - if host['platform'] =~ /windows/i |
40 |
| - on host, puppet('plugin download') |
41 |
| - end |
42 |
| - end |
| 44 | + copy_root_module_to(default, :source => proj_root, :module_name => 'stdlib') |
43 | 45 | end
|
44 | 46 | end
|
45 | 47 |
|
|
0 commit comments