From af8b73b6c946c6028072fb2e409e0b6a4062a9af Mon Sep 17 00:00:00 2001 From: "kirby@puppetlabs.com" Date: Fri, 8 Jun 2018 12:40:03 -0700 Subject: [PATCH] Change default vsphere connection behavior This commit changes the vsphere connection behavior to set insecure false. Without this change insecure is always set to true when making a connection regardless of the setting provided with the provider configuration. --- lib/vmpooler/providers/vsphere.rb | 2 +- vmpooler.yaml.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vmpooler/providers/vsphere.rb b/lib/vmpooler/providers/vsphere.rb index cfd087c..aad3358 100644 --- a/lib/vmpooler/providers/vsphere.rb +++ b/lib/vmpooler/providers/vsphere.rb @@ -410,7 +410,7 @@ module Vmpooler connection = RbVmomi::VIM.connect host: provider_config['server'], user: provider_config['username'], password: provider_config['password'], - insecure: provider_config['insecure'] || true + insecure: provider_config['insecure'] || false metrics.increment('connect.open') return connection rescue => err diff --git a/vmpooler.yaml.example b/vmpooler.yaml.example index ad7eb61..206a814 100644 --- a/vmpooler.yaml.example +++ b/vmpooler.yaml.example @@ -52,7 +52,7 @@ # # - insecure # Whether to ignore any HTTPS negotiation errors (e.g. untrusted self-signed certificates) -# (optional: default true) +# (optional: default false) # # - datacenter # The datacenter within vCenter to manage VMs. This can be overridden in the pool configuration