Example script and setting for running Ansible playbook in Windows Sandbox Environment.
The script makes Windows Sandbox environment to test software or library easily.
The script will do the below things
- Install Chocolatey(for installing all of the below software)
- Install Cygwin(for running ansible)
- Setup WinRM using ConfigureRemotingForAnsible.ps1 see here
- Change the WDAGUtilityAccount password to you'll input when run "run_setup.ps1" at first.
-
Enable Windows Sandbox
https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview -
double click test.wsb file, it will open the Windows Sandbox environment.
-
move "run_setup.ps1" and "dev_playbook.yml" to Windows sandbox.
- just copying both files to Windows sandbox("Ctrl+C", "Ctrl+V" works)
- Also, you can share the host folder to edit test.web "MappedFolder" Section see here
-
execute run_setup.ps1 like the below.
Powershell -ExecutionPolicy RemoteSigned -File "C:\Users\WDAGUtilityAccount\Desktop\run_setup.ps1"
input password for WDAGUtilityAccount (Windows Sandbox Account)
The action overwrites WDAGUtilityAccount Password. -
tools and software will install through "ansible-playbook" based on dev_playbook.yml.
by default, git,VSCode,SourceTree and notepad++
Name | Info |
---|---|
Edition | Windows 10 Pro |
Version | 21H2 |
OS Build No | 19044.1889 |