Skip to content

Instantly share code, notes, and snippets.

@nitzmahone
Created September 3, 2015 15:45
Show Gist options
  • Save nitzmahone/4271319ab8e7acf3330c to your computer and use it in GitHub Desktop.
Save nitzmahone/4271319ab8e7acf3330c to your computer and use it in GitHub Desktop.
Ansible Provision Windows in AWS with Stock AMIs (Part 1)
ansible win -i hosts -m win_ping
aws-win-host ansible_ssh_host=(your aws host public IP here)
[win]
aws-win-host
[win:vars]
ansible_connection=winrm
ansible_ssh_port=5986
ansible_ssh_user=Administrator
ansible_ssh_pass=myTempPassword123!
<powershell>
$admin = [adsi]("WinNT://./administrator, user")
$admin.PSBase.Invoke("SetPassword", "myTempPassword123!")
Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))
</powershell>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment