flutter, add FLUTTER_HOME and refactor some variables.
This commit is contained in:
1 parent
494a9b70f6
commit
007f338d2e
1 file changed
+7
-39
@@ -12,19 +12,20 @@
|
|||||||
|
|
||||||
- name: Workstation | Linux | Software | Flutter | Facts 2
|
- name: Workstation | Linux | Software | Flutter | Facts 2
|
||||||
ansible.builtin.set_fact:
|
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
|
- name: Workstation | Linux | Software | Flutter | Facts 3
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
flutter: "{{ flutter_bin_location }}/flutter"
|
flutter_exe: "{{ flutter_bin }}/flutter"
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | Flutter | Facts 4
|
- name: Workstation | Linux | Software | Flutter | Facts 4
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
flutter_report_commands:
|
flutter_report_commands:
|
||||||
- "date > {{ flutter_report }}"
|
- "date > {{ flutter_report }}"
|
||||||
- "{{ flutter }} --disable-analytics >> {{ flutter_report }}"
|
- "{{ flutter_exe }} --disable-analytics >> {{ flutter_report }}"
|
||||||
- "date >> {{ flutter_report }}"
|
- "date >> {{ flutter_report }}"
|
||||||
- "{{ flutter }} doctor -v >> {{ flutter_report }}"
|
- "{{ flutter_exe }} doctor -v >> {{ flutter_report }}"
|
||||||
- "date >> {{ flutter_report }}"
|
- "date >> {{ flutter_report }}"
|
||||||
|
|
||||||
## Checks ##
|
## Checks ##
|
||||||
@@ -128,45 +129,12 @@
|
|||||||
|
|
||||||
## Configure Environment ##
|
## 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)
|
- 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: |
|
||||||
export PATH="{{ flutter_bin_location }}:$PATH"
|
export FLUTTER_HOME="{{ flutter_sdk }}"
|
||||||
|
export PATH="{{ flutter_bin }}:$PATH"
|
||||||
marker: '# {mark} MANAGED BY ANSIBLE | Flutter'
|
marker: '# {mark} MANAGED BY ANSIBLE | Flutter'
|
||||||
state: present
|
state: present
|
||||||
create: true
|
create: true
|
||||||
|
|||||||
Reference in new issue
Block a user