Skip to content

Instantly share code, notes, and snippets.

@spuder
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spuder/62d09e658c612cbc9baf to your computer and use it in GitHub Desktop.
Save spuder/62d09e658c612cbc9baf to your computer and use it in GitHub Desktop.
kitchen - command line is too long

Running into this issue test-kitchen/test-kitchen#638

---
driver:
  name: vagrant

provisioner:
  name: chef_solo

platforms:
  - name: spencer/windows-2012r2
    driver_config:
      communicator: winrm
      vm_hostname: false
    transport:
      name: winrm

suites:
  - name: default
    run_list:
      - recipe[ND-Webserver2012::default]
    attributes:

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :


VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(2) do |config|
  config.vm.box = "lmayorga1980/windows-2012r2"
  config.vm.communicator = "winrm"
  config.vm.guest = :windows
  config.vm.synced_folder ".", "c:/chef/cookbooks/ND-Webserver2012"

  # To prevent conflicts with other windows VMs, the RDP port has been changed to 1234
  # To Connect, RDP to 127.0.0.1:1234
  
  config.vm.network "forwarded_port", host: 1234, guest: 3389
  config.vm.provider "virtualbox" do |v|
    v.cpus = 2
    v.memory = 2048
  end

  config.vm.provision 'shell', inline: 'choco install chef-client -y'

  config.vm.provision "chef_solo", run: "always" do |chef|
    chef.add_recipe "ND-Webserver2012::default"
    chef.cookbooks_path = ["c:/chef/cookbooks"]
  end

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment