diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 07dabba..7309c35 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -257,6 +257,7 @@ # These are safe to run multiple times, and uses the new `latest` version. - name: Workstation | Linux | Software | Android | Install | Required Modules shell: | + set -o pipefail if [[ {{ android_sdkmanager2_list }} | grep -v 'unknown' | grep -q '{{ item }}' == 1 ]]; then yes | {{ android_sdkmanager2_install }} '{{ item }}' @@ -277,6 +278,7 @@ # Add more versions for testing across all the important platforms. - name: Workstation | Linux | Software | Android | Install | Additional Modules shell: | + set -o pipefail if [[ {{ android_sdkmanager2_list }} | grep -v 'unknown' | grep -q '{{ item }}' == 1 ]]; then yes | {{ android_sdkmanager2_install }} '{{ item }}' @@ -298,6 +300,7 @@ # Remove extra downloads if system is not meant for full amount of testing. - name: Workstation | Linux | Software | Android | Uninstall | Additional Modules shell: | + set -o pipefail if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then yes | {{ android_sdkmanager2_remove }} '{{ item }}' @@ -319,6 +322,7 @@ # Remove any versions which used to be part of this script and no longer used. - name: Workstation | Linux | Software | Android | Uninstall | Unused Modules shell: | + set -o pipefail if [[ {{ android_sdkmanager2_list }} | grep -q '{{ item }}' == 0 ]]; then yes | {{ android_sdkmanager2_remove }} '{{ item }}'