Skip to content

Commit ab06c2b

Browse files
committed
Merge pull request redhat-openstack#241 from cyberious/InstallCert
Use apply manifest instead of timeout transaction if it hangs
2 parents 75dd725 + 8cb4c24 commit ab06c2b

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

spec/spec_helper_acceptance.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
55
# This will install the latest available package on el and deb based
66
# systems fail on windows and osx, and install via gem on other *nixes
7-
foss_opts = { :default_action => 'gem_install' }
7+
foss_opts = {:default_action => 'gem_install'}
88

9-
if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
9+
if default.is_pe?; then
10+
install_pe;
11+
else
12+
install_puppet(foss_opts);
13+
end
1014

1115
hosts.each do |host|
1216
on hosts, "mkdir -p #{host['distmoduledir']}"
@@ -25,7 +29,13 @@
2529
# Install module and dependencies
2630
hosts.each do |host|
2731
if fact_on(host, 'osfamily') == 'windows'
28-
on host, 'powershell.exe -command "(New-Object System.Net.Webclient).DownloadString(\'https://forge.puppetlabs.com\')"'
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)
2939
end
3040

3141
on host, "mkdir -p #{host['distmoduledir']}/concat"
@@ -36,7 +46,7 @@
3646
scp_to host, "#{proj_root}/#{file}", target
3747
end
3848
#copy_module_to(host, :source => proj_root, :module_name => 'concat')
39-
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
49+
on host, puppet('module', 'install', 'puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
4050
end
4151
end
4252

0 commit comments

Comments
 (0)