From b765c5cdae99d69805e07b94ef4a737b2bdb249f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 25 Apr 2026 08:53:12 -0700 Subject: [PATCH] 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. --- tasks/workstation/linux/software/android.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 55c92db..f7a3385 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -243,14 +243,20 @@ # These are safe to run multiple times, and uses the new `latest` version. - 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 }}" become_user: "{{ user }}" when: coding == true # Add more versions for testing across all the important platforms. - 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 }}" become_user: "{{ user }}" when: coding == true and sdks == true