mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
(maint) Add support for VMFLOATY_SSH_KEY
This will allow you to specify an ssh key for accessing the VMs.
This commit is contained in:
parent
1b60afdc0f
commit
b51d8aebae
1 changed files with 4 additions and 0 deletions
|
|
@ -31,6 +31,10 @@ class Ssh
|
||||||
|
|
||||||
hostname = "#{response[host_os]["hostname"]}.#{response["domain"]}"
|
hostname = "#{response[host_os]["hostname"]}.#{response["domain"]}"
|
||||||
ssh_options= ["-oStrictHostKeyChecking=no", "-oUserKnownHostsFile=/dev/null"]
|
ssh_options= ["-oStrictHostKeyChecking=no", "-oUserKnownHostsFile=/dev/null"]
|
||||||
|
if ENV['VMFLOATY_SSH_KEY']
|
||||||
|
ssh_options << "-i #{ENV['VMFLOATY_SSH_KEY']}"
|
||||||
|
end
|
||||||
|
|
||||||
cmd = "#{ssh_path} #{ssh_options.join(' ')} #{user}@#{hostname}"
|
cmd = "#{ssh_path} #{ssh_options.join(' ')} #{user}@#{hostname}"
|
||||||
|
|
||||||
# TODO: Should this respect more ssh settings? Can it be configured
|
# TODO: Should this respect more ssh settings? Can it be configured
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue