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