Elminate usage of "BOOL == true".
This commit is contained in:
@@ -156,7 +156,7 @@
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: android_sdkmanager_temp_stat
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [2/2]
|
||||
stat:
|
||||
@@ -165,7 +165,7 @@
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: android_sdkmanager_check
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Check Download Exists
|
||||
stat:
|
||||
@@ -174,7 +174,7 @@
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: android_download_stat
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
## Packages ##
|
||||
|
||||
@@ -190,14 +190,14 @@
|
||||
- "{{ bzip }}"
|
||||
- "{{ android_udev }}"
|
||||
state: present
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Dependencies [Remove]
|
||||
package:
|
||||
name:
|
||||
- "{{ android_sdkmanager }}"
|
||||
state: absent
|
||||
when: coding == true
|
||||
when: coding
|
||||
and ansible_pkg_mgr == "apt"
|
||||
|
||||
## Install SDK ##
|
||||
@@ -230,7 +230,7 @@
|
||||
group: "{{ user }}"
|
||||
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
and not android_sdkmanager_temp_stat.stat.exists
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Delete Archive
|
||||
@@ -249,7 +249,7 @@
|
||||
- platform-tools
|
||||
- emulator
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
and not android_sdkmanager_check.stat.exists
|
||||
|
||||
# These are safe to run multiple times, and uses the new `latest` version.
|
||||
@@ -269,7 +269,7 @@
|
||||
changed_when: "'INSTALLED' in install_required.stdout"
|
||||
failed_when: "'FAILED' in install_required.stdout"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
# Add more versions for testing across all the important platforms.
|
||||
- name: Workstation | Linux | Software | Android | Install | Additional Modules
|
||||
@@ -288,8 +288,8 @@
|
||||
changed_when: "'INSTALLED' in install_additional.stdout"
|
||||
failed_when: "'FAILED' in install_additional.stdout"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
and sdks == true
|
||||
when: coding
|
||||
and sdks
|
||||
|
||||
# Remove extra downloads if system is not meant for full amount of testing.
|
||||
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
|
||||
@@ -328,36 +328,36 @@
|
||||
changed_when: "'REMOVED' in remove_unused.stdout"
|
||||
failed_when: "'FAILED' in remove_unused.stdout"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
# Report the currently installed packges.
|
||||
- name: Workstation | Linux | Software | Android | Report Modules
|
||||
shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
## Flutter and Licenses ##
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Inform Flutter
|
||||
shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
- name: Workstation | Linux | Software | Android | License Agreements [1/2]
|
||||
shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
- name: Workstation | Linux | Software | Android | License Agreements [2/2]
|
||||
shell: "yes | {{ flutter }} doctor --android-licenses"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report
|
||||
shell: "{{ item }}"
|
||||
loop: "{{ flutter_report_commands }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
## Configure Environment ##
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
ignore_errors: true
|
||||
when: coding == true
|
||||
when: coding
|
||||
and user_root.home != ""
|
||||
and user_user.home != ""
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
ignore_errors: true
|
||||
when: coding == true
|
||||
when: coding
|
||||
and user_root.home != ""
|
||||
and user_user.home != ""
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
file:
|
||||
path: "{{ android_sdk_location }}"
|
||||
state: absent
|
||||
when: not coding == true
|
||||
when: not coding
|
||||
|
||||
## User Tools ##
|
||||
# Only needed from repo if not a development device,
|
||||
@@ -413,7 +413,7 @@
|
||||
- "{{ android_fastboot }}"
|
||||
- "{{ android_adb }}"
|
||||
state: present
|
||||
when: not coding == true
|
||||
when: not coding
|
||||
|
||||
- name: Workstation | Linux | Software | Android | System Tools [Remove]
|
||||
package:
|
||||
@@ -421,4 +421,4 @@
|
||||
- "{{ android_fastboot }}"
|
||||
- "{{ android_adb }}"
|
||||
state: absent
|
||||
when: coding == true
|
||||
when: coding
|
||||
|
||||
Reference in New Issue
Block a user