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
+28 -21
+28 -21
View File
@@ -46,9 +46,12 @@
get_mime: false
register: flutter_download_stat
## Packages ##
- name: Workstation | Linux | Software | Flutter | Install Block
block:
- name: Workstation | Linux | Software | Flutter | Necessities
## Packages ##
- name: Workstation | Linux | Software | Flutter | Necessities
ansible.builtin.package:
name:
- curl
@@ -59,10 +62,9 @@
- "{{ mesa }}"
- "{{ mesa_utils }}"
state: present
when: coding
# https://docs.flutter.dev/get-started/install/linux/desktop
- name: Workstation | Linux | Software | Flutter | Linux App Dependencies
# https://docs.flutter.dev/get-started/install/linux/desktop
- name: Workstation | Linux | Software | Flutter | Linux App Dependencies
ansible.builtin.package:
name:
- clang
@@ -74,10 +76,9 @@
- "{{ xz_libs }}"
- "{{ cpp }}"
state: present
when: coding
# https://docs.flutter.dev/get-started/install/linux/android
- name: Workstation | Linux | Software | Flutter | Android App Dependencies
# https://docs.flutter.dev/get-started/install/linux/android
- name: Workstation | Linux | Software | Flutter | Android App Dependencies
ansible.builtin.package:
name:
- "{{ c_libs }}"
@@ -85,13 +86,21 @@
- "{{ z_libs }}"
- "{{ bzip }}"
state: present
when: coding
## Install SDK ##
## Install SDK ##
- name: Workstation | Linux | Software | Flutter | SDK
- name: Workstation | Linux | Software | Flutter | SDK
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
ansible.builtin.get_url:
url: "{{ flutter_url }}"
@@ -118,18 +127,16 @@
become: true
become_user: "{{ user }}"
when: coding
and not flutter_sdk_stat.stat.exists
when: not flutter_sdk_stat.stat.exists
- name: Workstation | Linux | Software | Flutter | Delete Archive
- name: Workstation | Linux | Software | Flutter | Delete Archive
ansible.builtin.file:
path: "{{ flutter_download_file }}"
state: absent
when: coding
## Configure Environment ##
## Configure Environment ##
- name: Workstation | Linux | Software | Flutter | Modify PATH (profiles)
- name: Workstation | Linux | Software | Flutter | Modify PATH (profiles)
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
@@ -144,18 +151,18 @@
- ".bash_profile"
- ".zprofile"
- ".profile"
when: coding
and user_user.home != ""
when: user_user.home != ""
## Test SDK ##
## Test SDK ##
- name: Workstation | Linux | Software | Flutter | Doctor Report
- name: Workstation | Linux | Software | Flutter | Doctor Report
ansible.builtin.shell: "{{ item }}"
loop: "{{ flutter_report_commands }}"
become: true
become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding
## Uninstall SDK ##