android, stop adding path changes to rc files and begin putting them in profiles for user.

This commit is contained in:
me
2026-10-02 19:25:36 -07:00
parent 08b60b62b6
commit 827db06b38
+20 -7
View File
@@ -376,18 +376,13 @@
## Configure Environment ##
# # Android SDK, TBD/TODO for ~/.bash_profile and ~/.zprofile.
# export ANDROID_HOME="$HOME/Android/Sdk"
# export ANDROID_SDK_ROOT="$ANDROID_HOME" # deprecated, but some tools still check it
# export PATH="$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin"
- name: Workstation | Linux | Software | Android | Modify PATH (.bashrc)
ansible.builtin.blockinfile:
path: "{{ item }}/.bashrc"
block: |
export PATH="$PATH:{{ android_bin_location }}:{{ android_sdk_cmdline_final }}"
marker: '# {mark} MANAGED BY ANSIBLE | Android'
state: present
state: absent
create: true
backup: true
loop:
@@ -404,7 +399,7 @@
block: |
export PATH="$PATH:{{ android_bin_location }}:{{ android_sdk_cmdline_final }}"
marker: '# {mark} MANAGED BY ANSIBLE | Android'
state: present
state: absent
create: true
backup: true
loop:
@@ -415,6 +410,24 @@
and user_root.home != ""
and user_user.home != ""
- name: Workstation | Linux | Software | Flutter | Modify PATH (profiles)
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
export ANDROID_HOME="{{ android_sdk_location }}"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
export PATH="$PATH:{{ android_bin_location }}:{{ android_sdk_cmdline_final }}"
marker: '# {mark} MANAGED BY ANSIBLE | Android'
state: present
create: true
backup: true
loop:
- ".bash_profile"
- ".zprofile"
ignore_errors: true
when: coding
and user_user.home != ""
## Uninstall SDK ##
- name: Workstation | Linux | Software | Android | Remove SDK