Class: Kitchen::Provisioner::WindowsChefZero
- Inherits:
-
ChefZero
- Object
- ChefZero
- Kitchen::Provisioner::WindowsChefZero
- Defined in:
- lib/kitchen/provisioner/windows_chef_zero.rb
Overview
Windows Chef Zero provisioner.
Instance Method Summary collapse
- #create_sandbox ⇒ Object
-
#install_command ⇒ Object
It would be difficult to make the existing ‘Kitchen::Provisioner::ChefBase#install_command` Windows-friendly so we’ll just make it no-op.
-
#run_command ⇒ Object
We’re hacking Test Kitchen’s life-cycle a little here, but YOLO.
Instance Method Details
#create_sandbox ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/kitchen/provisioner/windows_chef_zero.rb', line 28 def create_sandbox super prepare_install_ps1 if config[:require_chef_omnibus] prepare_chef_client_zero_rb prepare_validation_pem prepare_client_rb prepare_run_script end |
#install_command ⇒ Object
It would be difficult to make the existing ‘Kitchen::Provisioner::ChefBase#install_command` Windows-friendly so we’ll just make it no-op.
26 |
# File 'lib/kitchen/provisioner/windows_chef_zero.rb', line 26 def install_command; end |
#run_command ⇒ Object
We’re hacking Test Kitchen’s life-cycle a little here, but YOLO.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/kitchen/provisioner/windows_chef_zero.rb', line 38 def run_command cmds = [] cmds << install_chef_command if config[:require_chef_omnibus] cmds << File.join(config[:windows_root_path], "run_client.bat") # Since these commands most likely run under cygwin's `/bin/sh` # let's make sure all paths have forward slashes. cmds.map { |cmd| cmd.gsub("\\", "/") }.join("; ") end |