|
18 | 18 | end
|
19 | 19 | end
|
20 | 20 |
|
| 21 | +# Install PE |
21 | 22 | run_puppet_install_helper
|
22 | 23 |
|
| 24 | +# Install PE License onto Master |
| 25 | +install_pe_license(master) |
| 26 | + |
23 | 27 | unless ENV['MODULE_provision'] == 'no'
|
24 | 28 | agents.each do |agent|
|
25 | 29 | # Emit CommonProgramFiles environment variable
|
26 | 30 | program_files = agent.get_env_var('ProgramFiles').split('=')[1]
|
27 | 31 | agent.add_env_var('CommonProgramFiles', "#{program_files}\\Common Files")
|
28 | 32 |
|
29 |
| - # Install sqlserver module to agent |
30 |
| - result = on agent, "echo #{agent['distmoduledir']}" |
31 |
| - target = result.raw_output.chomp |
32 |
| - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) |
33 |
| - exec_puppet = <<-EOS |
34 |
| - exec{'Download': |
35 |
| - command => 'powershell.exe -command "Invoke-WebRequest https://forgeapi.puppetlabs.com"', |
36 |
| - path => ['c:\\windows\\sysnative\\WindowsPowershell\\v1.0','c:\\windows\\system32\\WindowsPowershell\\v1.0'], |
37 |
| - } |
38 |
| - EOS |
39 |
| - apply_manifest_on(agent, exec_puppet) |
40 |
| - %w(puppetlabs/stdlib cyberious/pget).each do |dep| |
41 |
| - on agent, puppet("module install #{dep}") |
| 33 | + # Install Forge certs to allow for PMT installation. |
| 34 | + install_ca_certs(agent) |
| 35 | + |
| 36 | + # Install test helper modules onto agent. |
| 37 | + %w(puppetlabs-mount_iso cyberious-pget).each do |dep| |
| 38 | + on(agent, puppet("module install #{dep}")) |
42 | 39 | end
|
43 |
| - on agent, "git clone https://github.com/puppetlabs/puppetlabs-mount_iso #{target}/mount_iso" |
44 | 40 |
|
45 |
| - install_ca_certs(agent) |
| 41 | + # Determine root path of local module source. |
| 42 | + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) |
46 | 43 |
|
47 |
| - # in CI install from staging forge, otherwise from local |
| 44 | + # In CI install from staging forge, otherwise from local |
48 | 45 | staging = { :module_name => 'puppetlabs-sqlserver' }
|
49 |
| - local = { :module_name => 'sqlserver', :proj_root => proj_root, :target_module_path => target } |
| 46 | + local = { :module_name => 'sqlserver', :source => proj_root } |
50 | 47 |
|
51 |
| - install_dev_puppet_module_on(agent, options[:forge_host] ? staging : local) |
| 48 | + # Install sqlserver dependencies. |
| 49 | + on(agent, puppet('module install puppetlabs-stdlib')) |
| 50 | + |
| 51 | + # Install sqlserver module from local source. |
| 52 | + # See FM-5062 for more details. |
| 53 | + copy_module_to(agent, local) |
52 | 54 | end
|
53 | 55 | end
|
54 |
| - |
|
0 commit comments