This script will currently only work with Windows8, Windows 2012R2, Amazon Linux, RHEL6 and RHEL7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd c:\temp\ | |
| . .\NanoServer.ps1 | |
| cls | |
| $pass = ConvertTo-SecureString -String 'vagrant' -AsPlainText -Force | |
| $paramHash = @{ | |
| MediaPath = '.\NanoServer' | |
| BasePath = '.\NanoBase' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ISSUE HERE: https://github.com/saltstack/salt/issues/22796 | |
| DOCS HERE: https://docs.vagrantup.com/v2/provisioning/salt.html | |
| SOURCE HERE: https://github.com/saltstack/salt/blob/develop/pkg/windows/buildenv/conf/minion#L4 | |
| ipc_mode: tcp | |
| multiprocessing: True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\kitchen-salt-tutorial\beaver-formula>kitchen verify default -l debug | |
| -----> Starting Kitchen (v1.5.0) | |
| D [Vagrant command] BEGIN (vagrant --version) | |
| D [Vagrant command] END (0m0.00s) | |
| D [Vagrant command] BEGIN (vagrant plugin list) | |
| D [Vagrant command] END (0m0.00s) | |
| D Winrm Transport requested, loading WinRM::Transport gem (["~> 1.0", ">= 1.0.3"]) | |
| D WinRM::Transport library loaded | |
| D The winrm-s gem is being loaded to enable sspiauthentication. | |
| D winrm-s is loaded. sspinegotiate auth is now available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\kitchen-salt-tutorial\beaver-formula>kitchen diagnose --all | |
| --- | |
| timestamp: 2016-03-04 06:45:40 UTC | |
| kitchen_version: 1.5.0 | |
| plugins: | |
| driver: | |
| Vagrant: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex | |
| # Stop getting prompted | |
| choco feature enable -n=allowGlobalConfirmation | |
| # Show file extenstions and such | |
| choco install win-no-annoy -y | |
| # basics | |
| choco install microsoft-windows-terminal -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $Hso = New-Object Net.HttpListener | |
| $Hso.Prefixes.Add("http://+:8000/") | |
| $Hso.Start() | |
| While ($Hso.IsListening) { | |
| $HC = $Hso.GetContext() | |
| $HRes = $HC.Response | |
| $HRes.Headers.Add("Content-Type","text/plain") | |
| $Buf = [Text.Encoding]::UTF8.GetBytes((GC (Join-Path $Pwd ($HC.Request).RawUrl))) | |
| $HRes.ContentLength64 = $Buf.Length | |
| $HRes.OutputStream.Write($Buf,0,$Buf.Length) |
Long story short, ansible does not work on a Windows control machine, so you basically have to:
- either run
ansible --connection=local ...in the target vm - set up a separate control vm where ansible is installed via shell provisioner
Below are Vagrantfile examples for both approaches
OlderNewer