Skip to content

Commit 0613485

Browse files
author
Morgan Haskel
committed
Merge remote-tracking branch 'upstream/1.1.x' into merge_1.1.x
2 parents d97a047 + b69246a commit 0613485

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

spec/spec_helper_acceptance.rb

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,23 @@
1414

1515
hosts.each do |host|
1616
on hosts, "mkdir -p #{host['distmoduledir']}"
17+
if host['platform'] =~ /sles-1/i || host['platform'] =~ /solaris-1/i
18+
get_stdlib = <<-EOS
19+
package{'wget':}
20+
exec{'download':
21+
command => "wget -P /root/ https://forgeapi.puppetlabs.com/v3/files/puppetlabs-stdlib-4.3.2.tar.gz --no-check-certificate",
22+
path => ['/opt/csw/bin/','/usr/bin/']
23+
}
24+
EOS
25+
apply_manifest_on(host, get_stdlib)
26+
# have to use force otherwise it checks ssl cert even though it is a local file
27+
on host, puppet('module install /root/puppetlabs-stdlib-4.3.2.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
28+
elsif host['platform'] =~ /windows/i
29+
on host, shell('curl -k -o c:/cygwin64/home/Administrator/puppetlabs-stdlib-4.3.2.tar.gz https://forgeapi.puppetlabs.com/v3/files/puppetlabs-stdlib-4.3.2.tar.gz')
30+
on host, puppet('module install c:/cygwin64/home/Administrator/puppetlabs-stdlib-4.3.2.tar.gz --force --ignore-dependencies')
31+
else
32+
on host, puppet('module install puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
33+
end
1734
end
1835
end
1936

@@ -26,27 +43,8 @@
2643

2744
# Configure all nodes in nodeset
2845
c.before :suite do
29-
# Install module and dependencies
3046
hosts.each do |host|
31-
if fact_on(host, 'osfamily') == 'windows'
32-
pp = <<EOS
33-
exec{'download-cert':
34-
path => ['C:\Windows\System32\WindowsPowershell\v1.0','C:\Windows\Sysnative\WindowsPowershell\v1.0'],
35-
command => 'powershell.exe -command "(New-Object System.Net.Webclient).DownloadString(\"https://forge.puppetlabs.com\")"',
36-
}
37-
EOS
38-
apply_manifest_on(host, pp)
39-
end
40-
41-
on host, "mkdir -p #{host['distmoduledir']}/concat"
42-
result = on host, "echo #{host['distmoduledir']}/concat"
43-
target = result.raw_output.chomp
44-
45-
%w(files lib manifests metadata.json).each do |file|
46-
scp_to host, "#{proj_root}/#{file}", target
47-
end
48-
#copy_module_to(host, :source => proj_root, :module_name => 'concat')
49-
on host, puppet('module', 'install', 'puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
47+
copy_module_to(host, :source => proj_root, :module_name => 'concat')
5048
end
5149
end
5250

0 commit comments

Comments
 (0)