Don't be overzealous with passing the environment

Without this change, the gem helper passes the entirely of the user's
environment through beaker's SSH connection. This causes problems with
puppet 4 because all of the ruby and bundler arguments confuse the ruby
interpreter and we see errors like this:

  /var/lib/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/spec_set.rb:91:in `block in materialize'  :   Could not find rake-12.2.1 in any of the sources   (  Bundler::GemNotFound  )

The only important variable is PUPPET_VERSION so just pass that and
nothing else.

Change-Id: I678716890d0c749e755ec0526621d47fee44a4bb
This commit is contained in:
Colleen Murphy 2018-07-09 13:06:05 +02:00
parent 1226b84c9e
commit 42cd1ef1ef
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ def install_infra_modules(host, proj_root)
# Install module and dependencies
modname = JSON.parse(open('metadata.json').read)['name'].split('-')[1]
module_install_cmd = "bash #{ENV['HOME']}/src/#{SYSTEM_CONFIG}/tools/install_modules_acceptance.sh"
on host, module_install_cmd, :environment => ENV.to_hash
on host, module_install_cmd, :environment => {'PUPPET_VERSION' => ENV['PUPPET_VERSION']}
if ENV['PUPPET_VERSION'] == '4'
on host, "rm -fr /etc/puppetlabs/code/modules/#{modname}"
else