android, refactor and allow the removal on non-coding devices to fail.
This commit is contained in:
@@ -219,7 +219,8 @@
|
||||
group: "{{ user }}"
|
||||
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true and not android_sdkmanager_temp_stat.stat.exists
|
||||
when: coding == true
|
||||
and not android_sdkmanager_temp_stat.stat.exists
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Delete Archive
|
||||
file:
|
||||
@@ -237,7 +238,8 @@
|
||||
- platform-tools
|
||||
- emulator
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true and not android_sdkmanager_final_stat.stat.exists
|
||||
when: coding == true
|
||||
and not android_sdkmanager_final_stat.stat.exists
|
||||
|
||||
# These are safe to run multiple times, and uses the new `latest` version.
|
||||
- name: Workstation | Linux | Software | Android | Install | Required Modules
|
||||
@@ -257,14 +259,17 @@
|
||||
fi
|
||||
loop: "{{ android_downloads_additional }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true and sdks == true
|
||||
when: coding == true
|
||||
and sdks == true
|
||||
|
||||
# Remove extra downloads if system is not meant for full amount of testing.
|
||||
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
|
||||
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||
loop: "{{ android_downloads_additional }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding != true or sdks != true
|
||||
when: coding != true
|
||||
or sdks != true
|
||||
ignore_errors: yes
|
||||
|
||||
# Remove any versions which used to be part of this script and no longer used.
|
||||
- name: Workstation | Linux | Software | Android | Uninstall | Unused Modules
|
||||
@@ -317,7 +322,9 @@
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
ignore_errors: yes
|
||||
when: coding == true and user_root.home != "" and user_user.home != ""
|
||||
when: coding == true
|
||||
and user_root.home != ""
|
||||
and user_user.home != ""
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Modify PATH (.zshrc)
|
||||
blockinfile:
|
||||
@@ -332,7 +339,9 @@
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
ignore_errors: yes
|
||||
when: coding == true and user_root.home != "" and user_user.home != ""
|
||||
when: coding == true
|
||||
and user_root.home != ""
|
||||
and user_user.home != ""
|
||||
|
||||
## Uninstall SDK ##
|
||||
|
||||
|
||||
Reference in New Issue
Block a user