From 9344f7b9e8db35e9374fa2e0cfc186091aea4251 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 5 Oct 2022 10:10:27 +0000 Subject: [PATCH] winroom: add HAXM for Android Studio --- roles/winroom/tasks/Android_Studio.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/roles/winroom/tasks/Android_Studio.yml b/roles/winroom/tasks/Android_Studio.yml index d4a0f0d..6a85812 100644 --- a/roles/winroom/tasks/Android_Studio.yml +++ b/roles/winroom/tasks/Android_Studio.yml @@ -48,3 +48,29 @@ ANDROID_HOME: "{{ sdk_path }}" ANDROID_PREFS_ROOT: D:\ GRADLE_USER_HOME: D:\.gradle + +- name: Check HAXM install status + win_stat: + path: "%ProgramFiles%\\Intel\\HAXM" + register: file + +- when: not file.stat.exists + block: + - name: Download HAXM + win_get_url: + url: https://github.com/intel/haxm/releases/download/v7.7.1/haxm-windows_v7_7_1.zip + dest: C:\ + register: download + + - name: Unzip HAXM + win_unzip: + src: "{{ download.dest }}" + dest: C:\haxm + + - name: Install HAXM + win_command: C:\haxm\silent_install.bat + + - name: Remove temporaries + win_file: + path: C:\haxm + state: absent