Forked from gregjhogan/ansible-win-10-wsl-config.sh
Created
January 30, 2018 01:06
-
-
Save rodtreweek/97346ff1fa310e7796bc6f8a07451998 to your computer and use it in GitHub Desktop.
ansible windows 10 WSL configuration
This file contains 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
sudo apt-get -y update | |
sudo apt-get -y install python | |
sudo easy_install pip | |
sudo pip install ansible | |
sudo pip install "pywinrm>=0.2.2" | |
# kerberos authentication support | |
#sudo apt-get install -y python-dev libkrb5-dev krb5-user | |
#sudo pip install pywinrm[kerberos] | |
# fix for https://github.com/Microsoft/BashOnWindows/issues/286 | |
sudo apt-get install -y execstack | |
sudo execstack -c /usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/_openssl.so | |
# test connectivity and authentication | |
ansible windows -i ./hosts -m win_ping -u [email protected] -k | |
# windows patches (will not reboot) | |
ansible windows -i ./hosts -m win_updates -u [email protected] -k | |
# windows reboot | |
ansible windows -i ./hosts -m win_reboot -u [email protected] -k |
This file contains 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
# place file here: ./hosts | |
[windows] | |
VM.DOMAIN.COM |
This file contains 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
# place file here: ./group_vars/windows.yml | |
ansible_port: 5986 | |
ansible_connection: winrm | |
ansible_winrm_scheme: https | |
ansible_winrm_transport: ntlm | |
ansible_winrm_server_cert_validation: ignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment