Rather than overwrite the Android SDKs every run, only do them if they are not listed. update-sdk function can update these manually rather than wasting bandwidth through Ansible.
This commit is contained in:
@@ -243,14 +243,20 @@
|
|||||||
|
|
||||||
# These are safe to run multiple times, and uses the new `latest` version.
|
# These are safe to run multiple times, and uses the new `latest` version.
|
||||||
- name: Workstation | Linux | Software | Android | Install | Required Modules
|
- name: Workstation | Linux | Software | Android | Install | Required Modules
|
||||||
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
shell: |
|
||||||
|
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
|
||||||
|
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
|
||||||
|
fi
|
||||||
loop: "{{ android_downloads_required }}"
|
loop: "{{ android_downloads_required }}"
|
||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
when: coding == true
|
when: coding == true
|
||||||
|
|
||||||
# Add more versions for testing across all the important platforms.
|
# Add more versions for testing across all the important platforms.
|
||||||
- name: Workstation | Linux | Software | Android | Install | Additional Modules
|
- name: Workstation | Linux | Software | Android | Install | Additional Modules
|
||||||
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
shell: |
|
||||||
|
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
|
||||||
|
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
|
||||||
|
fi
|
||||||
loop: "{{ android_downloads_additional }}"
|
loop: "{{ android_downloads_additional }}"
|
||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
when: coding == true and sdks == true
|
when: coding == true and sdks == true
|
||||||
|
|||||||
Reference in New Issue
Block a user