流浪汉插件没有在流浪汉上运行

时间:2020-01-22 20:30:43

标签: vagrant vagrantfile vagrant-plugin

我安装了一个流浪者插件“ vagrant-certificates”,并将以下配置添加到我的〜/ .vagrant.d / Vagrantfile

if !['plugin', 'box'].include? ARGV[0]
    unless Vagrant.has_plugin?("vagrant-ca-certificates")
      raise "Missing required plugin 'vagrant-certificates', run `vagrant plugin install vagrant-certificates`\n"
    end
end

config.certificates.enabled = true
config.certificates.certs = Dir.glob('/home/myhomedirectory/.vagrant.d/*.crt')

,该插件将无法运行。我知道使用该插件的其他人在无所事事时会得到以下输出:

==> machine: Uploading root certificates to guest instance...
==> machine: -- /var/folders/mb/1pt7p7zd4q736lq4vdq_309w0000gn/T/vagrant-certificates20200122-60457- 
wop57o => /usr/share/ca-certificates/private/BA%20ROOT.crt
==> machine: -- /var/folders/mb/1pt7p7zd4q736lq4vdq_309w0000gn/T/vagrant-certificates20200122-60457- 
3v8nhs => /usr/share/ca-certificates/private/BA%20NPE%20CA-3%281%29.crt
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.

但是我没有看到与证书相关的输出:

enter image description here

,我收到一个ssl错误,该错误指示尚未安装我需要的证书。 有人可以帮我调试吗?

编辑:我尝试指定证书的其他方式:

config.certificates.certs = [
  "./certROOT.crt",
  "./certNPE_CA_3.crt"
]

config.certificates.certs = [
  "http://pki.mycorp.org/certs/certROOT.crt",
  "http://pki.mycorp.org/certs/certNPE_CA_3.crt"
]

编辑2:无所事事的输出--debug 2>&1> / dev / null | grep -i证书

 INFO manager:   - vagrant-certificates = [installed: 2.0.0 constraint: > 0]
DEBUG bundler: Current generated plugin dependency list: [<Gem::Dependency type=:runtime name="vagrant-certificates" requirements="= 2.0.0">]
DEBUG bundler: Activating solution set: ["vagrant-certificates-2.0.0"]
DEBUG bundler: Activating gem vagrant-certificates-2.0.0
 INFO manager: Loading plugin `vagrant-certificates` with default require: `vagrant-certificates`
 INFO manager: Registered plugin: vagrant-certificates
DEBUG manager: Successfully loaded plugin `vagrant-certificates`.
 INFO manager:   - vagrant-certificates = [installed: 2.0.0 constraint: > 0]
DEBUG bundler: Current generated plugin dependency list: [<Gem::Dependency type=:runtime name="vagrant-certificates" requirements="= 2.0.0">]
DEBUG bundler: Activating solution set: ["vagrant-certificates-2.0.0"]
DEBUG bundler: Activating gem vagrant-certificates-2.0.0
 INFO manager: Loading plugin `vagrant-certificates` with default require: `vagrant-certificates`
DEBUG manager: Successfully loaded plugin `vagrant-certificates`.
 INFO warden: Calling IN action: #<VagrantPlugins::Certificates::Action::InstallCertificates:0x0000000002eea438>
 INFO warden: Calling OUT action: #<VagrantPlugins::Certificates::Action::InstallCertificates:0x0000000002eea438>
DEBUG subprocess: stdout: fatal: [k8s-master]: FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate for packages.cloud.google.com:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificat

s / cacert.org,/ etc / ansible。异常消息是:[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:590)。“} INFO界面:详细信息:致命信息:[k8s-master]:失败! => {“ changed”:false,“ msg”:“无法验证packages.cloud.google.com:443的SSL证书。请确保您的受管系统已安装有效的CA证书。如果满足以下条件,则可以使用validate_certs = False:您不需要确认服务器的身份,但这是不安全的,因此不建议您为此平台检查路径:/ etc / ssl / certs,/ etc / pki / ca-trust / extracted / pem,/ etc / pki / tls /证书,/ usr / share / ca-certificates / cacert.org,/ etc / ansible。例外消息是:[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:590)。“}

0 个答案:

没有答案