flutter, ensure permissions are correct for pub -cache folder.

This commit is contained in:
me committed 2026-11-10 19:22:47 -07:00
1 parent aa9ccbfd54
commit 3bc2185962
1 file changed
+15 -8
+15 -8
View File
@@ -46,6 +46,9 @@
get_mime: false get_mime: false
register: flutter_download_stat register: flutter_download_stat
- name: Workstation | Linux | Software | Flutter | Install Block
block:
## Packages ## ## Packages ##
- name: Workstation | Linux | Software | Flutter | Necessities - name: Workstation | Linux | Software | Flutter | Necessities
@@ -59,7 +62,6 @@
- "{{ mesa }}" - "{{ mesa }}"
- "{{ mesa_utils }}" - "{{ mesa_utils }}"
state: present state: present
when: coding
# https://docs.flutter.dev/get-started/install/linux/desktop # https://docs.flutter.dev/get-started/install/linux/desktop
- name: Workstation | Linux | Software | Flutter | Linux App Dependencies - name: Workstation | Linux | Software | Flutter | Linux App Dependencies
@@ -74,7 +76,6 @@
- "{{ xz_libs }}" - "{{ xz_libs }}"
- "{{ cpp }}" - "{{ cpp }}"
state: present state: present
when: coding
# https://docs.flutter.dev/get-started/install/linux/android # https://docs.flutter.dev/get-started/install/linux/android
- name: Workstation | Linux | Software | Flutter | Android App Dependencies - name: Workstation | Linux | Software | Flutter | Android App Dependencies
@@ -85,13 +86,21 @@
- "{{ z_libs }}" - "{{ z_libs }}"
- "{{ bzip }}" - "{{ bzip }}"
state: present state: present
when: coding
## Install SDK ## ## Install SDK ##
- name: Workstation | Linux | Software | Flutter | SDK - name: Workstation | Linux | Software | Flutter | SDK
block: block:
- name: Workstation | Linux | Software | Flutter | Pub Cache Permissions
ansible.builtin.file:
path: "{{ user_user.home }}/.pub-cache"
state: directory
owner: "{{ user }}"
group: "{{ user }}"
mode: "0755"
when: user_user.home != ""
- name: Workstation | Linux | Software | Flutter | Download SDK - name: Workstation | Linux | Software | Flutter | Download SDK
ansible.builtin.get_url: ansible.builtin.get_url:
url: "{{ flutter_url }}" url: "{{ flutter_url }}"
@@ -118,14 +127,12 @@
become: true become: true
become_user: "{{ user }}" become_user: "{{ user }}"
when: coding when: not flutter_sdk_stat.stat.exists
and not flutter_sdk_stat.stat.exists
- name: Workstation | Linux | Software | Flutter | Delete Archive - name: Workstation | Linux | Software | Flutter | Delete Archive
ansible.builtin.file: ansible.builtin.file:
path: "{{ flutter_download_file }}" path: "{{ flutter_download_file }}"
state: absent state: absent
when: coding
## Configure Environment ## ## Configure Environment ##
@@ -144,8 +151,7 @@
- ".bash_profile" - ".bash_profile"
- ".zprofile" - ".zprofile"
- ".profile" - ".profile"
when: coding when: user_user.home != ""
and user_user.home != ""
## Test SDK ## ## Test SDK ##
@@ -156,6 +162,7 @@
become_user: "{{ user }}" become_user: "{{ user }}"
register: shell_check register: shell_check
changed_when: shell_check.rc == 0 changed_when: shell_check.rc == 0
when: coding when: coding
## Uninstall SDK ## ## Uninstall SDK ##