Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MikeKlebolt's full-sized avatar
🎯
Focusing

Mike Klebolt MikeKlebolt

🎯
Focusing
  • Ballwin, Missouri, USA
  • 03:52 (UTC -05:00)
View GitHub Profile
@MikeKlebolt
MikeKlebolt / Dockerfile
Last active February 25, 2024 21:37
Molecule setup used for testing Windows Ansible roles with Docker
# Molecule managed
FROM microsoft/windowsservercore:latest
RUN powershell.exe -Command \
wget https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -Proxy <proxy> -Outfile c:\remoting.ps1; \
powershell.exe -ExecutionPolicy ByPass -File c:\remoting.ps1 -EnableCredSSP; \
$password = ConvertTo-SecureString "<password>" -AsPlainText -Force; \
Set-LocalUser -Name administrator -Password $password; \
Enable-LocalUser -Name "Administrator"; \
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
EXPOSE 5986