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 get_mime: false
register: flutter_download_stat 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: ansible.builtin.package:
name: name:
- curl - curl
@@ -59,10 +62,9 @@
- "{{ 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
ansible.builtin.package: ansible.builtin.package:
name: name:
- clang - clang
@@ -74,10 +76,9 @@
- "{{ 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
ansible.builtin.package: ansible.builtin.package:
name: name:
- "{{ c_libs }}" - "{{ c_libs }}"
@@ -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,18 +127,16 @@
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 ##
- name: Workstation | Linux | Software | Flutter | Modify PATH (profiles) - name: Workstation | Linux | Software | Flutter | Modify PATH (profiles)
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}" path: "{{ user_user.home }}/{{ item }}"
block: | block: |
@@ -144,18 +151,18 @@
- ".bash_profile" - ".bash_profile"
- ".zprofile" - ".zprofile"
- ".profile" - ".profile"
when: coding when: user_user.home != ""
and 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 }}" ansible.builtin.shell: "{{ item }}"
loop: "{{ flutter_report_commands }}" loop: "{{ flutter_report_commands }}"
become: true become: true
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 ##