android, fix everything lint suggested besides the pipefails for single liners.

This commit is contained in:
me
2026-10-05 07:13:36 -07:00
parent 58f8636969
commit 39b949517a
+17 -5
View File
@@ -206,7 +206,7 @@
block: block:
- name: Workstation | Linux | Software | Android | Download Commandline Tools - name: Workstation | Linux | Software | Android | Download Commandline Tools
get_url: ansible.builtin.get_url:
url: "{{ android_url }}" url: "{{ android_url }}"
dest: "{{ android_download_file }}" dest: "{{ android_download_file }}"
owner: "{{ user }}" owner: "{{ user }}"
@@ -223,7 +223,7 @@
mode: '0755' mode: '0755'
- name: Workstation | Linux | Software | Android | Extract Tools - name: Workstation | Linux | Software | Android | Extract Tools
unarchive: ansible.builtin.unarchive:
src: "{{ android_download_file }}" src: "{{ android_download_file }}"
dest: "{{ android_sdk_cmdline_temp }}" dest: "{{ android_sdk_cmdline_temp }}"
owner: "{{ user }}" owner: "{{ user }}"
@@ -251,6 +251,8 @@
- emulator - emulator
become: true become: true
become_user: "{{ user }}" become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding when: coding
and not android_sdkmanager_check.stat.exists and not android_sdkmanager_check.stat.exists
@@ -345,6 +347,8 @@
ansible.builtin.shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}" ansible.builtin.shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}"
become: true become: true
become_user: "{{ user }}" become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding when: coding
## Flutter and Licenses ## ## Flutter and Licenses ##
@@ -353,18 +357,24 @@
ansible.builtin.shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}" ansible.builtin.shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}"
become: true become: true
become_user: "{{ user }}" become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding when: coding
- name: Workstation | Linux | Software | Android | License Agreements [1/2] - name: Workstation | Linux | Software | Android | License Agreements [1/2]
ansible.builtin.shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}" ansible.builtin.shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}"
become: true become: true
become_user: "{{ user }}" become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding when: coding
- name: Workstation | Linux | Software | Android | License Agreements [2/2] - name: Workstation | Linux | Software | Android | License Agreements [2/2]
ansible.builtin.shell: "yes | {{ flutter }} doctor --android-licenses" ansible.builtin.shell: "yes | {{ flutter }} doctor --android-licenses"
become: true become: true
become_user: "{{ user }}" become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding when: coding
- name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report - name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report
@@ -372,6 +382,8 @@
loop: "{{ flutter_report_commands }}" loop: "{{ flutter_report_commands }}"
become: true become: true
become_user: "{{ user }}" become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding when: coding
## Configure Environment ## ## Configure Environment ##
@@ -385,10 +397,10 @@
state: absent state: absent
create: true create: true
backup: true backup: true
mode: "0755"
loop: loop:
- "{{ user_root.home }}" - "{{ user_root.home }}"
- "{{ user_user.home }}" - "{{ user_user.home }}"
ignore_errors: true
when: coding when: coding
and user_root.home != "" and user_root.home != ""
and user_user.home != "" and user_user.home != ""
@@ -402,10 +414,10 @@
state: absent state: absent
create: true create: true
backup: true backup: true
mode: "0755"
loop: loop:
- "{{ user_root.home }}" - "{{ user_root.home }}"
- "{{ user_user.home }}" - "{{ user_user.home }}"
ignore_errors: true
when: coding when: coding
and user_root.home != "" and user_root.home != ""
and user_user.home != "" and user_user.home != ""
@@ -421,10 +433,10 @@
state: present state: present
create: true create: true
backup: true backup: true
mode: "0755"
loop: loop:
- ".bash_profile" - ".bash_profile"
- ".zprofile" - ".zprofile"
ignore_errors: true
when: coding when: coding
and user_user.home != "" and user_user.home != ""