vagrant-proxmox
vagrant-proxmox copied to clipboard
Option to set ":verify_ssl => false" ?
My proxmox cluster is on an internal network. Would it be possible to disable the SSL cert verification via an optional parameter for the proxmox provider endpoint?
proxmox.verify_ssl = false
could then be translated to :verify_ssl => false
for the RestClient calls.
Log output:
$ RESTCLIENT_LOG=stdout vagrant up --provider proxmox
RestClient.post "https://proxmox:8006/api2/json/access/ticket", "username=vagrant&password=password", "Accept"=>"*/*", "Accept-Encoding"=>"gzip, deflate", "Content-Length"=>"41", "Content-Type"=>"application/x-www-form-urlencoded", "User-Agent"=>"rest-client/2.0.2 (linux-gnu x86_64) ruby/2.7.1p83"
Unable to communicate with proxmox server:
ConnectProxmox: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
I am in a similar situation and would greatly appreciate this feature.
As a workaround you can add wrapper for RestClient::Request class into lib/vagrant-proxmox/proxmox/connection.rb
:
module RestClient
class Request
orig_initialize = instance_method(:initialize)
define_method(:initialize) do |args|
args[:verify_ssl] = false
orig_initialize.bind(self).(args)
end
end
end