diff --git a/tasks/workstation/linux/software/flutter.yml b/tasks/workstation/linux/software/flutter.yml index 7253f07..2ecc521 100644 --- a/tasks/workstation/linux/software/flutter.yml +++ b/tasks/workstation/linux/software/flutter.yml @@ -12,19 +12,20 @@ - name: Workstation | Linux | Software | Flutter | Facts 2 ansible.builtin.set_fact: - flutter_bin_location: "{{ flutter_sdk_location }}/flutter/bin" + flutter_home: "{{ flutter_sdk_location }}/flutter" + flutter_bin: "{{ flutter_sdk_location }}/flutter/bin" - name: Workstation | Linux | Software | Flutter | Facts 3 ansible.builtin.set_fact: - flutter: "{{ flutter_bin_location }}/flutter" + flutter_exe: "{{ flutter_bin }}/flutter" - name: Workstation | Linux | Software | Flutter | Facts 4 ansible.builtin.set_fact: flutter_report_commands: - "date > {{ flutter_report }}" - - "{{ flutter }} --disable-analytics >> {{ flutter_report }}" + - "{{ flutter_exe }} --disable-analytics >> {{ flutter_report }}" - "date >> {{ flutter_report }}" - - "{{ flutter }} doctor -v >> {{ flutter_report }}" + - "{{ flutter_exe }} doctor -v >> {{ flutter_report }}" - "date >> {{ flutter_report }}" ## Checks ## @@ -128,45 +129,12 @@ ## Configure Environment ## -- name: Workstation | Linux | Software | Flutter | Modify PATH (.bashrc) - ansible.builtin.blockinfile: - path: "{{ item }}/.bashrc" - block: | - export PATH="$PATH:{{ flutter_bin_location }}" - marker: '# {mark} MANAGED BY ANSIBLE | Flutter' - state: absent - create: true - backup: true - mode: "0755" - loop: - - "{{ user_root.home }}" - - "{{ user_user.home }}" - when: coding - and user_root.home != "" - and user_user.home != "" - -- name: Workstation | Linux | Software | Flutter | Modify PATH (.zshrc) - ansible.builtin.blockinfile: - path: "{{ item }}/.zshrc" - block: | - export PATH="$PATH:{{ flutter_bin_location }}" - marker: '# {mark} MANAGED BY ANSIBLE | Flutter' - state: absent - create: true - backup: true - mode: "0755" - loop: - - "{{ user_root.home }}" - - "{{ user_user.home }}" - when: coding - 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 PATH="{{ flutter_bin_location }}:$PATH" + export FLUTTER_HOME="{{ flutter_sdk }}" + export PATH="{{ flutter_bin }}:$PATH" marker: '# {mark} MANAGED BY ANSIBLE | Flutter' state: present create: true