Place commands which may be reused in other plybooks into more specific cmmands.

This commit is contained in:
Hyperling 2025-02-26 07:53:51 -07:00
parent 59704e4c6e
commit 07ba3e8e35

View File

@ -3,17 +3,30 @@
## Facts ##
- name: Workstation | Linux | Software | Flutter | Facts [1/2]
- name: Workstation | Linux | Software | Flutter | Facts [1/4]
set_fact:
flutter_url: "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.27.2-stable.tar.xz"
flutter_download_file: "{{ user_user.home }}/Downloads/flutter.tar.xz"
flutter_sdk_location: "{{ user_user.home }}/SDKs/Flutter"
flutter_report: "{{ user_user.home }}/Reports/flutter.txt"
- name: Workstation | Linux | Software | Flutter | Facts [2/2]
- name: Workstation | Linux | Software | Flutter | Facts [2/4]
set_fact:
flutter_bin_location: "{{ flutter_sdk_location }}/flutter/bin"
- name: Workstation | Linux | Software | Flutter | Facts [3/4]
set_fact:
flutter: "{{ flutter_bin_location }}/flutter"
- name: Workstation | Linux | Software | Flutter | Facts [3/3]
set_fact:
flutter_report_commands:
- "date > {{ flutter_report }}"
- "{{ flutter }} --disable-analytics >> {{ flutter_report }}"
- "date >> {{ flutter_report }}"
- "{{ flutter }} doctor -v >> {{ flutter_report }}"
- "date >> {{ flutter_report }}"
## Checks ##
- name: Workstation | Linux | Software | Flutter | Check SDK Exists
@ -60,9 +73,9 @@
package:
name:
- libc6:amd64
- libstdc++6:amd64
- libstdc++6
- lib32z1
- libbz2-1.0:amd64
- libbz2-1.0
state: present
when: coding == true
@ -138,12 +151,8 @@
- name: Workstation | Linux | Software | Flutter | Doctor Report
shell: "{{ item }}"
loop:
- "date > {{ flutter_report }}"
- "{{ flutter_bin_location }}/flutter --disable-analytics >> {{ flutter_report }}"
- "date >> {{ flutter_report }}"
- "{{ flutter_bin_location }}/flutter doctor -v >> {{ flutter_report }}"
- "date >> {{ flutter_report }}"
loop: "{{ flutter_report_commands }}"
become_user: "{{ user }}"
when: coding == true
## Uninstall SDK ##