Skip to content

Instantly share code, notes, and snippets.

@piccoloaiutante
Last active November 8, 2016 17:10
Show Gist options
  • Save piccoloaiutante/d6f0766235b63d44defd3d35bc1887c7 to your computer and use it in GitHub Desktop.
Save piccoloaiutante/d6f0766235b63d44defd3d35bc1887c7 to your computer and use it in GitHub Desktop.
First draft for support of windows update and reboot for NodeJS build script
---
- hosts: node-windows
tasks:
- name: Download and Install Windows Update
win_updates:
register: update_result
- name: Reboot machine if necessary
win_reboot:
when: update_result.reboot_required
- name: Create C:\TEMP directory
win_file: path='C:\TEMP' state=directory
- name: VS2015 | Download Visual Studio Community 2015 Setup
win_get_url:
url: 'https://go.microsoft.com/fwlink/?LinkId=532606'
dest: 'C:\TEMP\vs_community.exe'
tags: [download, visualstudio]
- name: VS2015 | Install Visual Studio Community 2015
raw: 'C:\TEMP\vs_community.exe /Silent /NoRestart
/InstallSelectableItems NativeLanguageSupport_Group
/Log C:\TEMP\vs2015_install_log.txt'
tags: [install, visualstudio]
- name: Reboot machine after Visual Studio installation
win_reboot:
- include: ./common-ansible-playbook.yaml
tags: common
@joaocgreis
Copy link

@piccoloaiutante Didn't try to run, but it looks good, you are on the right track! Testing on Windows 2008R2 would be important, can you get access to a 2008R2 VM or should I create a test machine in our infra?

@piccoloaiutante
Copy link
Author

@joaocgreis i can get it from msdn. Don't worry i'll be back with info about it. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment