Skip to content

* winrm.ssl_peer_verification must be a boolean. #327

@mirogta

Description

@mirogta

There is a bug in https://github.com/test-kitchen/kitchen-vagrant/blob/master/templates/Vagrantfile.erb
on line 71:
c.winrm.<%= key %> = "<%= value %>"

That code assumes the value will be always wrapped in double quotes which produces e.g.
c.winrm.ssl_peer_verification = "false"

But that is wrong, because for boolean values it must not be wrapped in double quotes.

If I have set up the following driver config:

platform:
  - name: windows-2012R2
    driver:
      box: kensykora/windows_2012_r2_standard
      cache_directory: D:/Cache
      winrm:
        transport: plaintext # negotiate | ssl | plaintext
        ssl_peer_verification: false
    transport:
      name: winrm
      elevated: true
      compression: none

It will fail with the following error:

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: Bringing machine 'default' up with 'virtualbox' provider...
STDERR: There are errors in the configuration of this machine. Please fix
the following errors and try again:

WinRM:

  • winrm.ssl_peer_verification must be a boolean.
    ---- End output of vagrant up --no-provision --provider virtualbox ----
    Ran vagrant up --no-provision --provider virtualbox returned 1] on default-windows-2012R2

Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions