From 76bc8535c13c79510b09ee279ec339e920bc9a57 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 29 Jan 2025 12:17:08 -0700 Subject: [PATCH 01/63] Add newline between repos and extra before/after messaging. --- tasks/general/acct_mgmt/users.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index b80f432..eabe689 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -464,11 +464,12 @@ alias docker-restart='docker compose down && docker compose up -d' alias_code_check: | alias code-check=' + echo "Checking ~/Code directory for git changes." ls -d ~/Code/* | while read project; do if [[ ! -d $project ]]; then continue fi - echo "*** `basename $project` ***" + echo -e "\n*** `basename $project` ***" cd $project if [[ -d .git ]]; then git pull @@ -477,6 +478,7 @@ echo "Not a Git project, skipping!" fi done + echo "Done!" ' alias_code_reset: | alias code-reset=' -- 2.49.0 From 85ba9946c3f154c99e57535b17e2a72009feba45 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 29 Jan 2025 13:33:59 -0700 Subject: [PATCH 02/63] Add a newline before the final message. --- tasks/general/acct_mgmt/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index eabe689..f73f4ef 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -478,7 +478,7 @@ echo "Not a Git project, skipping!" fi done - echo "Done!" + echo -e "\nDone!" ' alias_code_reset: | alias code-reset=' -- 2.49.0 From 2c6c4fee258cc369299766c11208d260cff3aba9 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 30 Jan 2025 16:37:24 -0700 Subject: [PATCH 03/63] Add cleaning of flutter projects. --- tasks/general/acct_mgmt/users.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index f73f4ef..236e147 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -572,6 +572,15 @@ find ~/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \ -exec du -hs {} \; -exec rm -rf {} \; + echo -e "******* Flutter *******" + ls ~/Code | grep flutter | while read project; do + cd ~/Code/$project + pwd + flutter clean + echo -e "\n" + done + cd + echo -e "\n*** Done! ***" } alias code-clean="clean-code" -- 2.49.0 From 79050c8ba6910de179771b9ccaf70e1db7a74a80 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 25 Feb 2025 13:38:22 -0700 Subject: [PATCH 04/63] Ensure aliases are understood in all functions and scripts. --- tasks/general/acct_mgmt/users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 236e147..8676448 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -172,6 +172,7 @@ unset goodbye unset only_sys unset only_flat + while getopts ":hygsf" opt; do case $opt in h) echo -e "$usage" @@ -588,6 +589,8 @@ - name: General | Account Management | Users | Files | Common Variable set_fact: rc_common: | + # Fixes "command not found" when using aliases within functions. + shopt -s expand_aliases {{ export_path_additions }} {{ alias_cp }} {{ alias_mv }} -- 2.49.0 From 4aa5e90dd9dc598605e1846ab3907cca04492bd2 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 25 Feb 2025 15:42:14 -0700 Subject: [PATCH 05/63] Ensure the group gets set too. --- tasks/workstation/linux/software/flutter.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/workstation/linux/software/flutter.yml b/tasks/workstation/linux/software/flutter.yml index 50cd305..ac8d1cf 100644 --- a/tasks/workstation/linux/software/flutter.yml +++ b/tasks/workstation/linux/software/flutter.yml @@ -76,6 +76,7 @@ url: "{{ flutter_url }}" dest: "{{ flutter_download_file }}" owner: "{{ user }}" + group: "{{ user }}" mode: '0664' when: not flutter_download_stat.stat.exists @@ -84,6 +85,7 @@ path: "{{ flutter_sdk_location }}" state: directory owner: "{{ user }}" + group: "{{ user }}" mode: '0755' - name: Workstation | Linux | Software | Flutter | Extract SDK @@ -91,6 +93,7 @@ src: "{{ flutter_download_file }}" dest: "{{ flutter_sdk_location }}" owner: "{{ user }}" + group: "{{ user }}" when: coding == true and not flutter_sdk_stat.stat.exists -- 2.49.0 From 59704e4c6e2851a99cdc70087d0e742c15758bbf Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 05:23:17 -0700 Subject: [PATCH 06/63] Add gparted for disk editing. --- tasks/workstation/linux/software/packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/workstation/linux/software/packages.yml b/tasks/workstation/linux/software/packages.yml index c0b0fd9..f629626 100644 --- a/tasks/workstation/linux/software/packages.yml +++ b/tasks/workstation/linux/software/packages.yml @@ -40,6 +40,7 @@ - "{{ evolution }}*" - adb - fastboot + - gparted state: present # Lutris # -- 2.49.0 From 07ba3e8e357856863aa84e2c7ac5ebdb67af7b9b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 07:53:51 -0700 Subject: [PATCH 07/63] Place commands which may be reused in other plybooks into more specific cmmands. --- tasks/workstation/linux/software/flutter.yml | 29 +++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/tasks/workstation/linux/software/flutter.yml b/tasks/workstation/linux/software/flutter.yml index ac8d1cf..ea6327d 100644 --- a/tasks/workstation/linux/software/flutter.yml +++ b/tasks/workstation/linux/software/flutter.yml @@ -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 ## -- 2.49.0 From d0d5a5306b1bf812d876a4c15c606d4e4939e347 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 07:54:41 -0700 Subject: [PATCH 08/63] Create playbook which installs and configures an Android SDK. Ensures Flutter has everything it needs for Android deployment. --- local.yml | 3 + tasks/workstation/linux/software/android.yml | 196 +++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 tasks/workstation/linux/software/android.yml diff --git a/local.yml b/local.yml index 96db67f..b18c2c5 100644 --- a/local.yml +++ b/local.yml @@ -156,6 +156,9 @@ - include_tasks: tasks/workstation/linux/software/flutter.yml when: ansible_system == "Linux" + - include_tasks: tasks/workstation/linux/software/android.yml + when: ansible_system == "Linux" + - include_tasks: tasks/workstation/linux/software/flatpaks.yml when: ansible_system == "Linux" and flatpak_distro diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml new file mode 100644 index 0000000..0d3a7d7 --- /dev/null +++ b/tasks/workstation/linux/software/android.yml @@ -0,0 +1,196 @@ +--- +# Android Studio (and SDK?). Copied and adjusted from Flutter playbook. +# https://wiki.debian.org/AndroidStudio +# https://developer.android.com/studio/install + +## Facts ## + +# Studio download URLs: +# https://developer.android.com/studio/archive +# Current version: +# https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2024.2.2.14/android-studio-2024.2.2.14-linux.tar.gz +# Command-line tools is all Flutter actually needs: +# https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip + +- name: Workstation | Linux | Software | Android | Facts [1/2] + set_fact: + android_url: "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip" + android_download_file: "{{ user_user.home }}/Downloads/android-cmdline-tools.tar.xz" + android_sdk_location: "{{ user_user.home }}/SDKs/Android/Sdk" + +- name: Workstation | Linux | Software | Android | Facts [2/2] + set_fact: + android_bin_location: "{{ android_sdk_location }}/platform-tools" + android_sdkmanager: "{{ android_sdk_location }}/cmdline-tools/bin/sdkmanager" + +## Checks ## + +- name: Workstation | Linux | Software | Android | Check SDK Exists + stat: + path: "{{ android_bin_location }}" + register: android_sdk_stat + +- name: Workstation | Linux | Software | Android | Check Download Exists + stat: + path: "{{ android_download_file }}" + register: android_download_stat + +## Packages ## + +# https://docs.flutter.dev/get-started/install/linux/android +- name: Workstation | Linux | Software | Android | Dependencies [Install] + package: + name: + - default-jdk + - libc6 + - libncurses5 + - libstdc++6 + - lib32z1 + - libbz2-1.0 + state: present + when: coding == true + +- name: Workstation | Linux | Software | Android | Dependencies [Remove] + package: + name: + - sdkmanager + state: absent + when: coding == true + +## Install SDK ## + +- name: Workstation | Linux | Software | Android | SDK + block: + + - name: Workstation | Linux | Software | Android | Download Commandline Tools + get_url: + url: "{{ android_url }}" + dest: "{{ android_download_file }}" + owner: "{{ user }}" + group: "{{ user }}" + mode: '0664' + when: not android_download_stat.stat.exists + + - name: Workstation | Linux | Software | Android | Create Folder + file: + path: "{{ android_sdk_location }}" + state: directory + owner: "{{ user }}" + group: "{{ user }}" + mode: '0755' + + - name: Workstation | Linux | Software | Android | Extract Tools + unarchive: + src: "{{ android_download_file }}" + dest: "{{ android_sdk_location }}" + owner: "{{ user }}" + group: "{{ user }}" + + when: coding == true and not android_sdk_stat.stat.exists + +- name: Workstation | Linux | Software | Android | Delete Archive + file: + path: "{{ android_download_file }}" + state: absent + +## Configure Modules ## + +- name: Workstation | Linux | Software | Android | Install Modules + shell: "yes | {{ android_sdkmanager }} '{{ item }}' --sdk_root={{ android_sdk_location }}" + loop: + # latest + - cmdline-tools;latest + - platform-tools + - emulator + # 34 + - build-tools;34.0.0 + - platforms;android-34 + - sources;android-34 + # 35 + - build-tools;35.0.0 + - build-tools;35.0.1 + - platforms;android-35 + - sources;android-35 + # Images + - system-images;android-35;default;x86_64 + - system-images;android-35;aosp_atd;x86_64 + - system-images;android-35;google_apis_playstore;x86_64 + become_user: "{{ user }}" + +- name: Workstation | Linux | Software | Android | Update Modules + shell: "yes | {{ android_sdkmanager }} --update --sdk_root={{ android_sdk_location }}" + become_user: "{{ user }}" + +- name: Workstation | Linux | Software | Android | Inform Flutter + shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}" + become_user: "{{ user }}" + +- name: Workstation | Linux | Software | Android | License Agreements + shell: "yes | {{ flutter }} doctor --android-licenses" + become_user: "{{ user }}" + +- name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report + shell: "{{ item }}" + loop: "{{ flutter_report_commands }}" + become_user: "{{ user }}" + when: coding == true + +## Configure Environment ## + +- name: Workstation | Linux | Software | Android | Modify PATH (.bashrc) + blockinfile: + path: "{{ item }}/.bashrc" + block: | + export PATH="$PATH:{{ android_bin_location }}" + marker: '# {mark} MANAGED BY ANSIBLE | Android' + state: present + create: yes + backup: yes + loop: + - "{{ user_root.home }}" + - "{{ user_user.home }}" + ignore_errors: yes + when: coding == true and user_root.home != "" and user_user.home != "" + +- name: Workstation | Linux | Software | Android | Modify PATH (.zshrc) + blockinfile: + path: "{{ item }}/.zshrc" + block: | + export PATH="$PATH:{{ android_bin_location }}" + marker: '# {mark} MANAGED BY ANSIBLE | Android' + state: present + create: yes + backup: yes + loop: + - "{{ user_root.home }}" + - "{{ user_user.home }}" + ignore_errors: yes + when: coding == true and user_root.home != "" and user_user.home != "" + +## Uninstall SDK ## + +- name: Workstation | Linux | Software | Android | Remove SDK + file: + path: "{{ android_sdk_location }}" + state: absent + when: not coding == true + +## User Tools ## +# Only needed from repo if not a development device, +# otherwise better versions are in the SDK. + +- name: Workstation | Linux | Software | Android | System Tools [Install] + package: + name: + - fastboot + - adb + state: present + when: not coding == true + +- name: Workstation | Linux | Software | Android | System Tools [Remove] + package: + name: + - fastboot + - adb + state: absent + when: coding == true -- 2.49.0 From 2708e367df532d2cfa4abffa42b8189e1dbeeda2 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:29:31 -0700 Subject: [PATCH 09/63] Attempt to fix when Sdk/ already exists but latest/sdkmanager is not present yet. --- tasks/workstation/linux/software/android.yml | 62 +++++++++++++++----- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 0d3a7d7..050604e 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -12,28 +12,41 @@ # Command-line tools is all Flutter actually needs: # https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -- name: Workstation | Linux | Software | Android | Facts [1/2] +- name: Workstation | Linux | Software | Android | Facts [1/3] set_fact: android_url: "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip" android_download_file: "{{ user_user.home }}/Downloads/android-cmdline-tools.tar.xz" android_sdk_location: "{{ user_user.home }}/SDKs/Android/Sdk" -- name: Workstation | Linux | Software | Android | Facts [2/2] +- name: Workstation | Linux | Software | Android | Facts [2/3] set_fact: android_bin_location: "{{ android_sdk_location }}/platform-tools" - android_sdkmanager: "{{ android_sdk_location }}/cmdline-tools/bin/sdkmanager" + android_sdk_location_temp: "{{ android_sdk_location }}/ansible" + android_sdkmanager_final: "{{ android_sdk_location }}/cmdline-tools/latest/bin/sdkmanager" + +- name: Workstation | Linux | Software | Android | Facts [3/3] + set_fact: + android_sdkmanager_temp: "{{ android_sdk_location_temp }}/cmdline-tools/bin/sdkmanager" ## Checks ## -- name: Workstation | Linux | Software | Android | Check SDK Exists +- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [1/2] stat: - path: "{{ android_bin_location }}" - register: android_sdk_stat + path: "{{ android_sdkmanager_temp }}" + register: android_sdkmanager_temp_stat + when: coding == true + +- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [2/2] + stat: + path: "{{ android_sdkmanager_final }}" + register: android_sdkmanage_final_stat + when: coding == true - name: Workstation | Linux | Software | Android | Check Download Exists stat: path: "{{ android_download_file }}" register: android_download_stat + when: coding == true ## Packages ## @@ -86,7 +99,7 @@ owner: "{{ user }}" group: "{{ user }}" - when: coding == true and not android_sdk_stat.stat.exists + when: coding == true and not android_sdkmanager_temp_stat.stat.exists - name: Workstation | Linux | Software | Android | Delete Archive file: @@ -95,13 +108,21 @@ ## Configure Modules ## -- name: Workstation | Linux | Software | Android | Install Modules - shell: "yes | {{ android_sdkmanager }} '{{ item }}' --sdk_root={{ android_sdk_location }}" +# This can only be run once, otherwise cmdline-tools creates latest-* folders. +- name: Workstation | Linux | Software | Android | Install Consistent Modules + shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}" loop: - # latest + # Current - cmdline-tools;latest - platform-tools - emulator + become_user: "{{ user }}" + when: coding == true and not android_sdkmanager_final_stat.stat.exists + +# These are safe to run multiple times. +- name: Workstation | Linux | Software | Android | Install Modules + shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}" + loop: # 34 - build-tools;34.0.0 - platforms;android-34 @@ -112,22 +133,31 @@ - platforms;android-35 - sources;android-35 # Images - - system-images;android-35;default;x86_64 - - system-images;android-35;aosp_atd;x86_64 + #- system-images;android-35;default;x86_64 + #- system-images;android-35;aosp_atd;x86_64 - system-images;android-35;google_apis_playstore;x86_64 become_user: "{{ user }}" + when: coding == true and not android_sdkmanager_final_stat.stat.exists - name: Workstation | Linux | Software | Android | Update Modules - shell: "yes | {{ android_sdkmanager }} --update --sdk_root={{ android_sdk_location }}" + shell: "yes | {{ android_sdkmanager_final }} --update --sdk_root={{ android_sdk_location }}" become_user: "{{ user }}" + when: coding == true - name: Workstation | Linux | Software | Android | Inform Flutter shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}" become_user: "{{ user }}" + when: coding == true -- name: Workstation | Linux | Software | Android | License Agreements +- name: Workstation | Linux | Software | Android | Licenses Agreements [1/2] + shell: "yes | {{ android_sdkmanager_final }} --licenses --android-sdk={{ android_sdk_location }}" + become_user: "{{ user }}" + when: coding == true + +- name: Workstation | Linux | Software | Android | License Agreements [2/2] shell: "yes | {{ flutter }} doctor --android-licenses" become_user: "{{ user }}" + when: coding == true - name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report shell: "{{ item }}" @@ -141,7 +171,7 @@ blockinfile: path: "{{ item }}/.bashrc" block: | - export PATH="$PATH:{{ android_bin_location }}" + export PATH="$PATH:{{ android_bin_location }}:{{ android_sdkmanager_final }}" marker: '# {mark} MANAGED BY ANSIBLE | Android' state: present create: yes @@ -156,7 +186,7 @@ blockinfile: path: "{{ item }}/.zshrc" block: | - export PATH="$PATH:{{ android_bin_location }}" + export PATH="$PATH:{{ android_bin_location }}:{{ android_sdkmanager_final }}" marker: '# {mark} MANAGED BY ANSIBLE | Android' state: present create: yes -- 2.49.0 From f64a9584be73bd0294ac3efdfa83e8a3f2a10aa1 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:29:55 -0700 Subject: [PATCH 10/63] Save a little time in the script if system is not for coding. --- tasks/workstation/linux/software/flutter.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/workstation/linux/software/flutter.yml b/tasks/workstation/linux/software/flutter.yml index ea6327d..47be9f9 100644 --- a/tasks/workstation/linux/software/flutter.yml +++ b/tasks/workstation/linux/software/flutter.yml @@ -9,14 +9,17 @@ 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" + when: coding == true - name: Workstation | Linux | Software | Flutter | Facts [2/4] set_fact: flutter_bin_location: "{{ flutter_sdk_location }}/flutter/bin" + when: coding == true - name: Workstation | Linux | Software | Flutter | Facts [3/4] set_fact: flutter: "{{ flutter_bin_location }}/flutter" + when: coding == true - name: Workstation | Linux | Software | Flutter | Facts [3/3] set_fact: @@ -26,6 +29,7 @@ - "date >> {{ flutter_report }}" - "{{ flutter }} doctor -v >> {{ flutter_report }}" - "date >> {{ flutter_report }}" + when: coding == true ## Checks ## @@ -33,11 +37,13 @@ stat: path: "{{ flutter_sdk_location }}" register: flutter_sdk_stat + when: coding == true - name: Workstation | Linux | Software | Flutter | Check Download Exists stat: path: "{{ flutter_download_file }}" register: flutter_download_stat + when: coding == true ## Packages ## -- 2.49.0 From 4bc52d984c016d17717443bdb5a938a967b404b6 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:30:17 -0700 Subject: [PATCH 11/63] `adb` and `fastboot` were moved to `android.yml`. --- tasks/workstation/linux/software/packages.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tasks/workstation/linux/software/packages.yml b/tasks/workstation/linux/software/packages.yml index f629626..80db610 100644 --- a/tasks/workstation/linux/software/packages.yml +++ b/tasks/workstation/linux/software/packages.yml @@ -38,8 +38,6 @@ - "{{ appimagelauncher }}" - "{{ evolution }}" - "{{ evolution }}*" - - adb - - fastboot - gparted state: present -- 2.49.0 From 2e8c2205c33db80a7989a0898977f56ed15a3843 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:33:54 -0700 Subject: [PATCH 12/63] Enhance comment. Fix typo. Fix conditional. --- tasks/workstation/linux/software/android.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 050604e..02753d3 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -39,7 +39,7 @@ - name: Workstation | Linux | Software | Android | Check SDK Manager Exists [2/2] stat: path: "{{ android_sdkmanager_final }}" - register: android_sdkmanage_final_stat + register: android_sdkmanager_final_stat when: coding == true - name: Workstation | Linux | Software | Android | Check Download Exists @@ -119,7 +119,7 @@ become_user: "{{ user }}" when: coding == true and not android_sdkmanager_final_stat.stat.exists -# These are safe to run multiple times. +# These are safe to run multiple times, and uses the new `latest` version. - name: Workstation | Linux | Software | Android | Install Modules shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}" loop: @@ -137,7 +137,7 @@ #- system-images;android-35;aosp_atd;x86_64 - system-images;android-35;google_apis_playstore;x86_64 become_user: "{{ user }}" - when: coding == true and not android_sdkmanager_final_stat.stat.exists + when: coding == true - name: Workstation | Linux | Software | Android | Update Modules shell: "yes | {{ android_sdkmanager_final }} --update --sdk_root={{ android_sdk_location }}" -- 2.49.0 From e3887098a065b4e38390304691949e07eca7c40d Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:36:36 -0700 Subject: [PATCH 13/63] Modify variable names and attempt to get the tar extracted to the correct `ansible/` subdirectory. --- tasks/workstation/linux/software/android.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 02753d3..a0d7205 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -21,12 +21,12 @@ - name: Workstation | Linux | Software | Android | Facts [2/3] set_fact: android_bin_location: "{{ android_sdk_location }}/platform-tools" - android_sdk_location_temp: "{{ android_sdk_location }}/ansible" + android_sdk_cmdline_temp: "{{ android_sdk_location }}/ansible" android_sdkmanager_final: "{{ android_sdk_location }}/cmdline-tools/latest/bin/sdkmanager" - name: Workstation | Linux | Software | Android | Facts [3/3] set_fact: - android_sdkmanager_temp: "{{ android_sdk_location_temp }}/cmdline-tools/bin/sdkmanager" + android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/sdkmanager" ## Checks ## @@ -95,7 +95,7 @@ - name: Workstation | Linux | Software | Android | Extract Tools unarchive: src: "{{ android_download_file }}" - dest: "{{ android_sdk_location }}" + dest: "{{ android_sdk_cmdline_temp }}" owner: "{{ user }}" group: "{{ user }}" -- 2.49.0 From a6c819a0861ac05e7b9290fb5e9e9ece9d88808e Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:37:13 -0700 Subject: [PATCH 14/63] Ensure directory exists to untar into. --- tasks/workstation/linux/software/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index a0d7205..4bbf2aa 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -86,7 +86,7 @@ - name: Workstation | Linux | Software | Android | Create Folder file: - path: "{{ android_sdk_location }}" + path: "{{ android_sdk_cmdline_temp }}" state: directory owner: "{{ user }}" group: "{{ user }}" -- 2.49.0 From 659d46d088ab7c2cfbe88f64145e7ee617417c1c Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:55:51 -0700 Subject: [PATCH 15/63] Fix sdk location option for sdkmanager. --- tasks/workstation/linux/software/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 4bbf2aa..7b5e6a0 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -150,7 +150,7 @@ when: coding == true - name: Workstation | Linux | Software | Android | Licenses Agreements [1/2] - shell: "yes | {{ android_sdkmanager_final }} --licenses --android-sdk={{ android_sdk_location }}" + shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root-sdk={{ android_sdk_location }}" become_user: "{{ user }}" when: coding == true -- 2.49.0 From f9ffc9839f4efca1ff0377696302636f697ead2b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:59:45 -0700 Subject: [PATCH 16/63] Become user more often; make life easier. --- tasks/workstation/linux/software/android.yml | 3 ++- tasks/workstation/linux/software/flutter.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 7b5e6a0..2b1a1c9 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -82,7 +82,7 @@ owner: "{{ user }}" group: "{{ user }}" mode: '0664' - when: not android_download_stat.stat.exists + when: not android_download_stat.stat.existss - name: Workstation | Linux | Software | Android | Create Folder file: @@ -99,6 +99,7 @@ owner: "{{ user }}" group: "{{ user }}" + become_user: "{{ user }}" when: coding == true and not android_sdkmanager_temp_stat.stat.exists - name: Workstation | Linux | Software | Android | Delete Archive diff --git a/tasks/workstation/linux/software/flutter.yml b/tasks/workstation/linux/software/flutter.yml index 47be9f9..dba5551 100644 --- a/tasks/workstation/linux/software/flutter.yml +++ b/tasks/workstation/linux/software/flutter.yml @@ -114,6 +114,7 @@ owner: "{{ user }}" group: "{{ user }}" + become_user: "{{ user }}" when: coding == true and not flutter_sdk_stat.stat.exists - name: Workstation | Linux | Software | Flutter | Delete Archive -- 2.49.0 From 5ffe4d5b63620cd8383a813bcb8526d5082d8142 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 08:59:57 -0700 Subject: [PATCH 17/63] Fix typo in option. --- tasks/workstation/linux/software/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index 2b1a1c9..e6a2226 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -151,7 +151,7 @@ when: coding == true - name: Workstation | Linux | Software | Android | Licenses Agreements [1/2] - shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root-sdk={{ android_sdk_location }}" + shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}" become_user: "{{ user }}" when: coding == true -- 2.49.0 From 6eb48e4d9fe54d5b04673f54ac70c2c991edde8f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 09:10:26 -0700 Subject: [PATCH 18/63] Fix having `sdkmanager` in `$PATH`. --- tasks/workstation/linux/software/android.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index e6a2226..b314b4e 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -22,11 +22,12 @@ set_fact: android_bin_location: "{{ android_sdk_location }}/platform-tools" android_sdk_cmdline_temp: "{{ android_sdk_location }}/ansible" - android_sdkmanager_final: "{{ android_sdk_location }}/cmdline-tools/latest/bin/sdkmanager" + android_sdk_cmdline_final: "{{ android_sdk_location }}/cmdline-tools/latest/bin" - name: Workstation | Linux | Software | Android | Facts [3/3] set_fact: android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/sdkmanager" + android_sdkmanager_final: "{{ android_sdk_cmdline_final }}/sdkmanager" ## Checks ## @@ -82,7 +83,7 @@ owner: "{{ user }}" group: "{{ user }}" mode: '0664' - when: not android_download_stat.stat.existss + when: not android_download_stat.stat.exists - name: Workstation | Linux | Software | Android | Create Folder file: @@ -172,7 +173,7 @@ blockinfile: path: "{{ item }}/.bashrc" block: | - export PATH="$PATH:{{ android_bin_location }}:{{ android_sdkmanager_final }}" + export PATH="$PATH:{{ android_bin_location }}:{{ android_sdk_cmdline_final }}" marker: '# {mark} MANAGED BY ANSIBLE | Android' state: present create: yes @@ -187,7 +188,7 @@ blockinfile: path: "{{ item }}/.zshrc" block: | - export PATH="$PATH:{{ android_bin_location }}:{{ android_sdkmanager_final }}" + export PATH="$PATH:{{ android_bin_location }}:{{ android_sdk_cmdline_final }}" marker: '# {mark} MANAGED BY ANSIBLE | Android' state: present create: yes -- 2.49.0 From 02c153d26068e9a67a464da307acc992a335b8c9 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 09:21:13 -0700 Subject: [PATCH 19/63] Add aliases for using `stress`. --- tasks/general/acct_mgmt/users.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 8676448..3a32326 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -585,6 +585,17 @@ echo -e "\n*** Done! ***" } alias code-clean="clean-code" + alias_kill_battery: | + alias kill-battery="stress -c 1k" + alias waste-battery="kill-battery" + alias battery-killer="kill-battery" + alias battery-waster="kill-battery" + alias_kill_system: | + alias kill-system="stress -c 1k -i 1k -m 1k -d 1k" + alias die="kill-system" + alias lockup="kill-system" + alias freeze="kill-system" + alias system-killer="kill-system" - name: General | Account Management | Users | Files | Common Variable set_fact: @@ -630,6 +641,8 @@ {{ alias_scan }} {{ alias_prod }} {{ function_clean_code }} + {{ alias_kill_battery }} + {{ alias_kill_system }} - name: General | Account Management | Users | Files | .bashrc blockinfile: -- 2.49.0 From af13e2c3a48d810d2a7ec6e586b5ea694150182b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:10:04 -0700 Subject: [PATCH 20/63] Create shortcut for updating SDKs. Remove updating Android SDK from its playbook. --- tasks/general/acct_mgmt/users.yml | 17 +++++++++++++++++ tasks/workstation/linux/software/android.yml | 5 ----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 3a32326..6746e81 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -596,6 +596,22 @@ alias lockup="kill-system" alias freeze="kill-system" alias system-killer="kill-system" + function_update_sdks: | + if [[ "{{ coding }}" == "true" ]]; then + function update-sdks { + echo -e "******* Update SDKs *******\n*** Android ***" + yes | sdkmanager --update + yes | sdkmanager --licenses + + echo "\n*** Flutter ***" + flutter upgrade + yes | flutter doctor --android-licenses + + echo -e "\n******* Done! *******" + } + alias update-sdk="update-sdks" + alias sdk-update="update-sdks" + fi - name: General | Account Management | Users | Files | Common Variable set_fact: @@ -643,6 +659,7 @@ {{ function_clean_code }} {{ alias_kill_battery }} {{ alias_kill_system }} + {{ function_update_sdks }} - name: General | Account Management | Users | Files | .bashrc blockinfile: diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index b314b4e..6daaf98 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -141,11 +141,6 @@ become_user: "{{ user }}" when: coding == true -- name: Workstation | Linux | Software | Android | Update Modules - shell: "yes | {{ android_sdkmanager_final }} --update --sdk_root={{ android_sdk_location }}" - become_user: "{{ user }}" - when: coding == true - - name: Workstation | Linux | Software | Android | Inform Flutter shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}" become_user: "{{ user }}" -- 2.49.0 From 2c19c63a092f4045fdddc0f1d22322914f6106d0 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:19:34 -0700 Subject: [PATCH 21/63] Fix if statement, Ansible variable was `True` rather than `true`. --- tasks/general/acct_mgmt/users.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 6746e81..812f088 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -597,7 +597,7 @@ alias freeze="kill-system" alias system-killer="kill-system" function_update_sdks: | - if [[ "{{ coding }}" == "true" ]]; then + if [[ "$coding" == "true" ]]; then function update-sdks { echo -e "******* Update SDKs *******\n*** Android ***" yes | sdkmanager --update @@ -618,6 +618,11 @@ rc_common: | # Fixes "command not found" when using aliases within functions. shopt -s expand_aliases + + # Variables for conditionals + typeset -l coding + export coding="{{ coding }}" + {{ export_path_additions }} {{ alias_cp }} {{ alias_mv }} -- 2.49.0 From 2e223c5e28a8614f180e899d20a462f8107a26fe Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:19:49 -0700 Subject: [PATCH 22/63] Fix newline in output. --- tasks/general/acct_mgmt/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 812f088..088f52c 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -603,7 +603,7 @@ yes | sdkmanager --update yes | sdkmanager --licenses - echo "\n*** Flutter ***" + echo -e "\n*** Flutter ***" flutter upgrade yes | flutter doctor --android-licenses -- 2.49.0 From 5a3c7003809d617dccc1957d4b7138c1d7691fd8 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:21:22 -0700 Subject: [PATCH 23/63] Contain the output a little better. --- tasks/general/acct_mgmt/users.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 088f52c..f52ae25 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -599,13 +599,15 @@ function_update_sdks: | if [[ "$coding" == "true" ]]; then function update-sdks { - echo -e "******* Update SDKs *******\n*** Android ***" + echo -e "******* Update SDKs *******\n*** Android - START ***" yes | sdkmanager --update yes | sdkmanager --licenses + echo -e "*** Android - END ***" - echo -e "\n*** Flutter ***" + echo -e "\n*** Flutter - START ***" flutter upgrade yes | flutter doctor --android-licenses + echo -e "*** Flutter - END ***" echo -e "\n******* Done! *******" } -- 2.49.0 From bc0cb93b023f9d77fda32cc71a5173b7fedc49c6 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:24:38 -0700 Subject: [PATCH 24/63] Get the END messages up against the license messages. --- tasks/general/acct_mgmt/users.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index f52ae25..13cf782 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -602,12 +602,12 @@ echo -e "******* Update SDKs *******\n*** Android - START ***" yes | sdkmanager --update yes | sdkmanager --licenses - echo -e "*** Android - END ***" + echo -ne "*** Android - END ***" echo -e "\n*** Flutter - START ***" flutter upgrade yes | flutter doctor --android-licenses - echo -e "*** Flutter - END ***" + echo -ne "*** Flutter - END ***" echo -e "\n******* Done! *******" } -- 2.49.0 From 72f48d64ab6e16c7a1713a4a5d89a3cdc2fefa0d Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:25:25 -0700 Subject: [PATCH 25/63] Add alias `sdk-updater` for `update-sdks` --- tasks/general/acct_mgmt/users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 13cf782..06ed9d3 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -613,6 +613,7 @@ } alias update-sdk="update-sdks" alias sdk-update="update-sdks" + alias sdk-updater="update-sdks" fi - name: General | Account Management | Users | Files | Common Variable -- 2.49.0 From 50d499e91fa7cac44093e11dc2b0b0056e3dd23e Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:47:00 -0700 Subject: [PATCH 26/63] Add fun output script for some Ansible provision facts. --- tasks/general/acct_mgmt/users.yml | 34 ++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 06ed9d3..3cd74ea 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -597,7 +597,7 @@ alias freeze="kill-system" alias system-killer="kill-system" function_update_sdks: | - if [[ "$coding" == "true" ]]; then + if [[ "$workstation" == "true" && "$coding" == "true" ]]; then function update-sdks { echo -e "******* Update SDKs *******\n*** Android - START ***" yes | sdkmanager --update @@ -615,6 +615,25 @@ alias sdk-update="update-sdks" alias sdk-updater="update-sdks" fi + function_ansible_vars: | + function ansible-var-list { + cat << EOF + provision + battery + workstation + coding + editing + gaming + mobile + server + domain + EOF + } + function ansible-vars { + ansible-var-list | while read var; do + echo "$var = ${!var}" + done + } - name: General | Account Management | Users | Files | Common Variable set_fact: @@ -622,9 +641,17 @@ # Fixes "command not found" when using aliases within functions. shopt -s expand_aliases - # Variables for conditionals - typeset -l coding + # Variables for conditionals and quickly checking system setup. + typeset -l provision battery workstation coding editing gaming mobile server domain + export provision="{{ provision }}" + export battery="{{ battery }}" + export workstation="{{ workstation }}" export coding="{{ coding }}" + export editing="{{ editing }}" + export gaming="{{ gaming }}" + export mobile="{{ mobile }}" + export server="{{ server }}" + export domain="{{ domain }}" {{ export_path_additions }} {{ alias_cp }} @@ -668,6 +695,7 @@ {{ alias_kill_battery }} {{ alias_kill_system }} {{ function_update_sdks }} + {{ function_ansible_vars }} - name: General | Account Management | Users | Files | .bashrc blockinfile: -- 2.49.0 From c796d62fc36bd539bba385282a2654f077715f92 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 15:16:50 -0700 Subject: [PATCH 27/63] Add flutter projects to reseed list. Also remove projects not being touched much. --- tasks/general/acct_mgmt/users.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index b80f432..fab7c2f 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -499,10 +499,11 @@ nodejs-website android-break-the-habit android-tictactoe - android-expense-tracker - android-example-database-room android-carb-up ebook-health-protocol + flutter-expense-tracker + flutter-social-traveler-app + nodejs-social-traveler-server EOF } function code-reseed { @@ -513,8 +514,12 @@ git_main_project={{ git_project }} git_repo_ssh_basename=${git_repo_ssh//$git_main_project/} git_projects_to_sync | while read git_project; do + dest="$git_project" + if [[ "$dest" == "flutter-*" ]]; then + dest="${dest//-/_}" + fi git clone ${git_repo_ssh_basename}${git_project} \ - --branch dev ~/Code/$git_project + --branch dev ~/Code/$dest done } function_clean_filenames: | -- 2.49.0 From 82269f8cc2bc5a2e38108e6f4a949786c94e1ae1 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Mar 2025 12:41:01 -0700 Subject: [PATCH 28/63] Also add the Lutris ppa for Debian. --- tasks/workstation/linux/software/packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/workstation/linux/software/packages.yml b/tasks/workstation/linux/software/packages.yml index 80db610..cd4fa20 100644 --- a/tasks/workstation/linux/software/packages.yml +++ b/tasks/workstation/linux/software/packages.yml @@ -48,7 +48,7 @@ repo: ppa:lutris-team/lutris update_cache: yes state: present - when: ansible_distribution == "Ubuntu" and gaming == true + when: ansible_distribution in ("Ubuntu", "Debian") and gaming == true ignore_errors: yes - name: Workstation | Linux | Software | Packages | Add Lutris (besides ARM) @@ -72,7 +72,7 @@ repo: ppa:lutris-team/lutris update_cache: yes state: absent - when: ansible_distribution == "Ubuntu" and gaming is not defined + when: ansible_distribution in ("Ubuntu", "Debian") and gaming is not defined ignore_errors: yes # Remove Repo Software # -- 2.49.0 From fd156c6382b47389b3f9b45586d88cf40ba59b83 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Mar 2025 12:52:16 -0700 Subject: [PATCH 29/63] Move lutris to its own playbook while adding Debian support. --- local.yml | 3 ++ tasks/workstation/linux/software/lutris.yml | 52 +++++++++++++++++++ tasks/workstation/linux/software/packages.yml | 34 ------------ 3 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 tasks/workstation/linux/software/lutris.yml diff --git a/local.yml b/local.yml index b18c2c5..4254a71 100644 --- a/local.yml +++ b/local.yml @@ -123,6 +123,9 @@ - include_tasks: tasks/workstation/linux/software/packages.yml when: ansible_system == "Linux" + - include_tasks: tasks/workstation/linux/software/lutris.yml + when: ansible_system == "Linux" + - include_tasks: tasks/workstation/linux/software/brave.yml when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile diff --git a/tasks/workstation/linux/software/lutris.yml b/tasks/workstation/linux/software/lutris.yml new file mode 100644 index 0000000..97cd5d6 --- /dev/null +++ b/tasks/workstation/linux/software/lutris.yml @@ -0,0 +1,52 @@ +--- +# Lutris for running Windows games not in Steam. + +- name: Workstation | Linux | Software | Lutris | Add PPA (Ubuntu) + apt_repository: + repo: ppa:lutris-team/lutris + update_cache: yes + state: present + when: ansible_distribution in ("Ubuntu") and gaming == true + ignore_errors: yes + +- name: Workstation | Linux | Software | Lutris | Add PPA (Debian) + shell: "{{ item }}" + loop: + - echo "deb [signed-by=/etc/apt/keyrings/lutris.gpg] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/lutris.list > /dev/null + - wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/keyrings/lutris.gpg > /dev/null + - sudo apt update + when: ansible_distribution in ("Debian") and gaming == true + ignore_errors: yes + +- name: Workstation | Linux | Software | Lutris | Install (besides ARM) + package: + name: + - lutris + state: present + when: ansible_architecture != "aarch64" and gaming == true + ignore_errors: yes + +- name: Workstation | Linux | Software | Lutris | Uninstall (besides ARM) + package: + name: + - lutris + state: absent + when: ansible_architecture != "aarch64" and gaming is not defined + ignore_errors: yes + +- name: Workstation | Linux | Software | Lutris | Remove PPA (Ubuntu) + apt_repository: + repo: ppa:lutris-team/lutris + update_cache: yes + state: absent + when: ansible_distribution in ("Ubuntu") and gaming is not defined + ignore_errors: yes + +- name: Workstation | Linux | Software | Lutris | Remove PPA (Debian) + shell: "{{ item }}" + loop: + - mv /etc/apt/sources.list.d/lutris.list* ~/TRASH/ + - mv /etc/apt/keyrings/lutris.gpg ~/TRASH/ + - sudo apt update + when: ansible_distribution in ("Debian") and gaming is not defined + ignore_errors: yes diff --git a/tasks/workstation/linux/software/packages.yml b/tasks/workstation/linux/software/packages.yml index cd4fa20..f398af7 100644 --- a/tasks/workstation/linux/software/packages.yml +++ b/tasks/workstation/linux/software/packages.yml @@ -41,40 +41,6 @@ - gparted state: present -# Lutris # - -- name: Workstation | Linux | Software | Packages | Add Lutris PPA (Ubuntu) - apt_repository: - repo: ppa:lutris-team/lutris - update_cache: yes - state: present - when: ansible_distribution in ("Ubuntu", "Debian") and gaming == true - ignore_errors: yes - -- name: Workstation | Linux | Software | Packages | Add Lutris (besides ARM) - package: - name: - - lutris - state: present - when: ansible_architecture != "aarch64" and gaming == true - ignore_errors: yes - -- name: Workstation | Linux | Software | Packages | Remove Lutris (besides ARM) - package: - name: - - lutris - state: absent - when: ansible_architecture != "aarch64" and gaming is not defined - ignore_errors: yes - -- name: Workstation | Linux | Software | Packages | Remove Lutris PPA (Ubuntu) - apt_repository: - repo: ppa:lutris-team/lutris - update_cache: yes - state: absent - when: ansible_distribution in ("Ubuntu", "Debian") and gaming is not defined - ignore_errors: yes - # Remove Repo Software # - name: Workstation | Linux | Software | Packages | Remove Applications -- 2.49.0 From aacb53081a434d588c9ea773ad8a5a36561324ac Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Mar 2025 14:44:16 -0700 Subject: [PATCH 30/63] Add Lutris to favorites if it's installed. --- tasks/workstation/shared/settings/gnome.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/workstation/shared/settings/gnome.yml b/tasks/workstation/shared/settings/gnome.yml index d81bfb8..9b77745 100644 --- a/tasks/workstation/shared/settings/gnome.yml +++ b/tasks/workstation/shared/settings/gnome.yml @@ -23,6 +23,7 @@ , 'io.lmms.LMMS.desktop' , 'io.lbry.lbry-app.desktop', 'lbry.desktop' , 'com.valvesoftware.Steam.desktop' + , 'net.lutris.Lutris.desktop' ]" dconf_terminal: gnome-terminal dconf_theme: Adwaita-dark -- 2.49.0 From 87037148a7f4a9b1fdfc1081661fb5ca930cc56a Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 07:24:27 -0700 Subject: [PATCH 31/63] Add URL which had the added commands for Debian. --- tasks/workstation/linux/software/lutris.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/workstation/linux/software/lutris.yml b/tasks/workstation/linux/software/lutris.yml index 97cd5d6..a12117f 100644 --- a/tasks/workstation/linux/software/lutris.yml +++ b/tasks/workstation/linux/software/lutris.yml @@ -1,5 +1,6 @@ --- # Lutris for running Windows games not in Steam. +# https://lutris.net/downloads - name: Workstation | Linux | Software | Lutris | Add PPA (Ubuntu) apt_repository: -- 2.49.0 From 5c72168a7b76f0e0955670a01e7b12a2faf1278b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 08:11:04 -0700 Subject: [PATCH 32/63] Add the apt version of VS Codium for enhanced Flutter development over Flatpak version of Code OSS. Does ot compete with the Flatpak version of VS Codium. --- local.yml | 3 + tasks/workstation/linux/software/vscodium.yml | 70 +++++++++++++++++++ tasks/workstation/shared/settings/gnome.yml | 4 +- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 tasks/workstation/linux/software/vscodium.yml diff --git a/local.yml b/local.yml index 4254a71..516f871 100644 --- a/local.yml +++ b/local.yml @@ -126,6 +126,9 @@ - include_tasks: tasks/workstation/linux/software/lutris.yml when: ansible_system == "Linux" + - include_tasks: tasks/workstation/linux/software/vscodium.yml + when: ansible_system == "Linux" + - include_tasks: tasks/workstation/linux/software/brave.yml when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile diff --git a/tasks/workstation/linux/software/vscodium.yml b/tasks/workstation/linux/software/vscodium.yml new file mode 100644 index 0000000..ccee564 --- /dev/null +++ b/tasks/workstation/linux/software/vscodium.yml @@ -0,0 +1,70 @@ +--- +# Install version of Codium which can use local compilers and SDKs like Flutter +# properly. Flatpaks need workarounds to do this. This also lets us remove +# CodeOSS and use Codium in 2 ways. +# Commands sourced and modified based on: +# https://vscodium.com/#install-on-debian-ubuntu-deb-package +# This also exists but was not utilized: +# https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo + +## Facts ## + +# Paths + +- name: Workstation | Linux | Software | VS Codium | Facts + set_fact: + vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list" + vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg" + when: ansible_pkg_mgr == "apt" + +# Checks + +- name: Workstation | Linux | Software | VS Codium | Check PPA + stat: + path: "{{ vscodium_source_list }}" + register: vscodium_source_exists + when: ansible_pkg_mgr == "apt" + +## Install Repo ## + +- name: Workstation | Linux | Software | VS Codium | Add Latest Key + shell: "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ + | gpg --dearmor \ + | sudo tee {{ vscodium_keyfile }} > /dev/null" + when: ansible_pkg_mgr == "apt" and coding == true + +- name: Workstation | Linux | Software | VS Codium | Add PPA + shell: "{{ item }}" + loop: + - "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \ + | sudo tee {{ vscodium_source_list }}" + - "sudo apt update" + when: ansible_pkg_mgr == "apt" and coding == true and not vscodium_source_exists.stat.exists + +## Install Package ## + +- name: Workstation | Linux | Software | VS Codium | Install + package: + name: + - codium + state: present + when: ansible_pkg_mgr == "apt" and coding == true + +## Remove Package ## + +- name: Workstation | Linux | Software | VS Codium | Uninstall + package: + name: + - codium + state: absent + when: ansible_pkg_mgr == "apt" and coding != true + +## Remove Repo ## + +- name: Workstation | Linux | Software | VS Codium | Remove PPA + shell: "{{ item }}" + loop: + - "mv {{ vscodium_source_list }} ~/TRASH/" + - "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/" + - "sudo apt update" + when: ansible_pkg_mgr == "apt" and coding != true and vscodium_source_exists.stat.exists diff --git a/tasks/workstation/shared/settings/gnome.yml b/tasks/workstation/shared/settings/gnome.yml index 9b77745..79900bd 100644 --- a/tasks/workstation/shared/settings/gnome.yml +++ b/tasks/workstation/shared/settings/gnome.yml @@ -17,7 +17,7 @@ , 'org.telegram.desktop.desktop' , 'com.discordapp.Discord.desktop' , 'com.vscodium.codium.desktop' - , 'com.visualstudio.code-oss.desktop', 'code-oss.desktop' + , 'codium.desktop' , 'com.google.AndroidStudio.desktop' , 'org.shotcut.Shotcut.desktop' , 'io.lmms.LMMS.desktop' @@ -36,6 +36,8 @@ # 2025-01-01 # Reduce the amount of icons on the sidebar, things that may get added back. #, 'org.godotengine.Godot.desktop' +# 2025-03-07 Removed in place of a 2nd VS Codium install (apt version). +#, 'com.visualstudio.code-oss.desktop', 'code-oss.desktop' - name: Workstation | Account Management | GNOME | Facts (NixOS) set_fact: -- 2.49.0 From 05bf09c557cb5c34f7275c5581a95c16da7038ff Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 08:13:06 -0700 Subject: [PATCH 33/63] Add comments. --- tasks/workstation/linux/software/lutris.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/workstation/linux/software/lutris.yml b/tasks/workstation/linux/software/lutris.yml index a12117f..1db294f 100644 --- a/tasks/workstation/linux/software/lutris.yml +++ b/tasks/workstation/linux/software/lutris.yml @@ -2,6 +2,10 @@ # Lutris for running Windows games not in Steam. # https://lutris.net/downloads +## Facts ## + +## Install Repo ## + - name: Workstation | Linux | Software | Lutris | Add PPA (Ubuntu) apt_repository: repo: ppa:lutris-team/lutris @@ -19,6 +23,8 @@ when: ansible_distribution in ("Debian") and gaming == true ignore_errors: yes +## Install Package ## + - name: Workstation | Linux | Software | Lutris | Install (besides ARM) package: name: @@ -27,6 +33,8 @@ when: ansible_architecture != "aarch64" and gaming == true ignore_errors: yes +## Uninstall Package ## + - name: Workstation | Linux | Software | Lutris | Uninstall (besides ARM) package: name: @@ -35,6 +43,8 @@ when: ansible_architecture != "aarch64" and gaming is not defined ignore_errors: yes +## Uninstall Repo ## + - name: Workstation | Linux | Software | Lutris | Remove PPA (Ubuntu) apt_repository: repo: ppa:lutris-team/lutris -- 2.49.0 From 660429eab0ce678aa758c50c1ac14d9557eba162 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 08:19:43 -0700 Subject: [PATCH 34/63] Clean up log: No longer allow failures in Brave playbook. --- tasks/workstation/linux/software/brave.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/tasks/workstation/linux/software/brave.yml b/tasks/workstation/linux/software/brave.yml index 1dc5b40..e0d744a 100644 --- a/tasks/workstation/linux/software/brave.yml +++ b/tasks/workstation/linux/software/brave.yml @@ -60,28 +60,21 @@ - brave-browser - brave-keyring state: absent - ignore_errors: yes - name: Workstation | Software | Brave | Remove Repo [apt] - shell: "{{ item }}" - loop: - - rm /etc/apt/sources.list.d/brave-browser-*.list - - apt update + shell: rm /etc/apt/sources.list.d/brave-browser-*.list && apt update || echo "Not Needed" when: ansible_pkg_mgr == "apt" - ignore_errors: yes - name: Workstation | Software | Brave | Remove Repo [dnf] shell: "{{ item }}" loop: - - rm /etc/yum.repos.d/brave-browser-*.repo - - rpm -e gpg-pubkey-c2d4e821-5e7252b8 + - rm /etc/yum.repos.d/brave-browser-*.repo || echo "Not Needed" + - rpm -e gpg-pubkey-c2d4e821-5e7252b8 || echo "Not Needed" when: ansible_pkg_mgr == "dnf" - ignore_errors: yes - name: Workstation | Software | Brave | Remove Repo [zypper] shell: "{{ item }}" loop: - - zypper removerepo brave-browser - - rpm -e gpg-pubkey-c2d4e821-5e7252b8 + - zypper removerepo brave-browser || echo "Not Needed" + - rpm -e gpg-pubkey-c2d4e821-5e7252b8 || echo "Not Needed" when: ansible_pkg_mgr == "zypper" - ignore_errors: yes -- 2.49.0 From f9421585c955ba5bb93cb6511a770f96e90c2b3c Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 08:22:13 -0700 Subject: [PATCH 35/63] Clean up log: Remove reference to old Lynis install directory. --- tasks/general/tests/lynis.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tasks/general/tests/lynis.yml b/tasks/general/tests/lynis.yml index 87592cd..4923594 100644 --- a/tasks/general/tests/lynis.yml +++ b/tasks/general/tests/lynis.yml @@ -9,12 +9,8 @@ set_fact: lynis_temp_file: "{{ lynis_file }}.tmp" -- name: General | Tests | Lynis | Rename Old Install - shell: mv "/usr/local/lynis" "/usr/local/src/" - ignore_errors: yes - - name: General | Tests | Lynis | Install - git: + git: repo: https://github.com/CISOfy/lynis dest: "{{ lynis_install_dir }}" clone: yes @@ -22,7 +18,7 @@ ignore_errors: yes - name: General | Tests | Lynis | Ensure Permissions (Looking at you Parrot OS!) - file: + file: path: "{{ lynis_install_dir }}" state: directory mode: '0644' @@ -31,12 +27,12 @@ recurse: yes - name: General | Tests | Lynis | Ensure Permissions 2 - file: + file: path: "{{ lynis_install_dir }}/lynis" mode: '0755' - name: General | Tests | Lynis | Ensure Folder Permissions - file: + file: path: "{{ lynis_install_dir }}" state: directory mode: '0755' -- 2.49.0 From 048d4d16c15516a3b7aedbcf2dd465c71b6dd433 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 08:26:26 -0700 Subject: [PATCH 36/63] Update settings based on recent Codium development. --- files/settings/vscode.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/files/settings/vscode.json b/files/settings/vscode.json index 0b27509..7b04606 100644 --- a/files/settings/vscode.json +++ b/files/settings/vscode.json @@ -3,6 +3,7 @@ "save_loc1": "~/.var/app/com.visualstudio.code-oss/config/Code - OSS/{{ user_desc }}/settings.json", "save_loc2": "~/.var/app/com.vscodium.codium/config/VSCodium/{{ user_desc }}/settings.json", "END_COMMENTS": "", + "workbench.startupEditor": "none", "editor.rulers": [ 80, 120, 200 @@ -11,5 +12,14 @@ "editor.tabSize": 3, "editor.insertSpaces": false, "files.insertFinalNewline": true, - "files.trimFinalNewlines": true + "files.trimFinalNewlines": true, + "git.confirmSync": false, + + "[dart]": { + "editor.formatOnSave": true, + "editor.formatOnType": true, + "editor.selectionHighlight": false, + "editor.tabCompletion": "onlySnippets", + "editor.wordBasedSuggestions": "off" + } } -- 2.49.0 From a447389af24d65bf276526f6dfcc4a0500a9b37a Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 08:46:53 -0700 Subject: [PATCH 37/63] Move keyring to share while also modifying playbook to only do Debian steps when PPA does not already exist. --- tasks/workstation/linux/software/lutris.yml | 43 ++++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/tasks/workstation/linux/software/lutris.yml b/tasks/workstation/linux/software/lutris.yml index 1db294f..756ca83 100644 --- a/tasks/workstation/linux/software/lutris.yml +++ b/tasks/workstation/linux/software/lutris.yml @@ -2,7 +2,21 @@ # Lutris for running Windows games not in Steam. # https://lutris.net/downloads -## Facts ## +# Paths + +- name: Workstation | Linux | Software | Lutris | Facts + set_fact: + lutris_source_list: "/etc/apt/sources.list.d/lutris.list" + lutris_keyfile: "/usr/share/keyrings/lutris.gpg" + when: ansible_pkg_mgr == "apt" + +# Checks + +- name: Workstation | Linux | Software | Lutris | Check PPA + stat: + path: "{{ lutris_source_list }}" + register: lutris_source_exists + when: ansible_pkg_mgr == "apt" ## Install Repo ## @@ -17,11 +31,13 @@ - name: Workstation | Linux | Software | Lutris | Add PPA (Debian) shell: "{{ item }}" loop: - - echo "deb [signed-by=/etc/apt/keyrings/lutris.gpg] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/lutris.list > /dev/null - - wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/keyrings/lutris.gpg > /dev/null - - sudo apt update - when: ansible_distribution in ("Debian") and gaming == true - ignore_errors: yes + - "wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_12/Release.key \ + | gpg --dearmor \ + | sudo tee {{ lutris_keyfile }} > /dev/null" + - "echo 'deb [signed-by={{ lutris_keyfile }}] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./' \ + | sudo tee {{ lutris_source_list }} > /dev/null" + - "sudo apt update" + when: ansible_distribution in ("Debian") and gaming == true and not lutris_source_exists.stat.exists ## Install Package ## @@ -31,7 +47,6 @@ - lutris state: present when: ansible_architecture != "aarch64" and gaming == true - ignore_errors: yes ## Uninstall Package ## @@ -40,8 +55,7 @@ name: - lutris state: absent - when: ansible_architecture != "aarch64" and gaming is not defined - ignore_errors: yes + when: ansible_architecture != "aarch64" and gaming != true ## Uninstall Repo ## @@ -50,14 +64,13 @@ repo: ppa:lutris-team/lutris update_cache: yes state: absent - when: ansible_distribution in ("Ubuntu") and gaming is not defined + when: ansible_distribution in ("Ubuntu") and gaming != true ignore_errors: yes - name: Workstation | Linux | Software | Lutris | Remove PPA (Debian) shell: "{{ item }}" loop: - - mv /etc/apt/sources.list.d/lutris.list* ~/TRASH/ - - mv /etc/apt/keyrings/lutris.gpg ~/TRASH/ - - sudo apt update - when: ansible_distribution in ("Debian") and gaming is not defined - ignore_errors: yes + - "mv {{ lutris_source_list }} ~/TRASH/" + - "mv {{ lutris_keyfile }} ~/TRASH/" + - "sudo apt update" + when: ansible_distribution in ("Debian") and gaming != true and lutris_source_exists.stat.exists -- 2.49.0 From 695a7fc30b24a117be56cbbe9bfe4aba71386b5a Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 08:48:00 -0700 Subject: [PATCH 38/63] No real need to update the key every time, recombine the step. --- tasks/workstation/linux/software/vscodium.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tasks/workstation/linux/software/vscodium.yml b/tasks/workstation/linux/software/vscodium.yml index ccee564..446369b 100644 --- a/tasks/workstation/linux/software/vscodium.yml +++ b/tasks/workstation/linux/software/vscodium.yml @@ -27,15 +27,12 @@ ## Install Repo ## -- name: Workstation | Linux | Software | VS Codium | Add Latest Key - shell: "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ - | gpg --dearmor \ - | sudo tee {{ vscodium_keyfile }} > /dev/null" - when: ansible_pkg_mgr == "apt" and coding == true - - name: Workstation | Linux | Software | VS Codium | Add PPA shell: "{{ item }}" loop: + - "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ + | gpg --dearmor \ + | sudo tee {{ vscodium_keyfile }} > /dev/null" - "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \ | sudo tee {{ vscodium_source_list }}" - "sudo apt update" -- 2.49.0 From 6e1884b912ae9382d6d1fbd6a5c1cc83102945f7 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 09:05:43 -0700 Subject: [PATCH 39/63] Add -flatpak to the Flatpak's executable. --- tasks/workstation/linux/software/flatpaks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/workstation/linux/software/flatpaks.yml b/tasks/workstation/linux/software/flatpaks.yml index 0041a47..58b139b 100644 --- a/tasks/workstation/linux/software/flatpaks.yml +++ b/tasks/workstation/linux/software/flatpaks.yml @@ -42,7 +42,7 @@ - { app: "com.transmissionbt.Transmission", name: "transmission", extra: "" } - { app: "org.gimp.GIMP", name: "gimp", extra: "" } flatpaks_coding: - - { app: "com.vscodium.codium", name: "codium", extra: "" } + - { app: "com.vscodium.codium", name: "codium-flatpak", extra: "" } - { app: "com.google.AndroidStudio", name: "android-studio", extra: "" } - { app: "io.dbeaver.DBeaverCommunity", name: "dbeaver", extra: "" } - { app: "org.godotengine.Godot", name: "godot", extra: "" } -- 2.49.0 From 51f8cae0ec045b0a90b2ccafa90d569345d64efc Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 09:06:03 -0700 Subject: [PATCH 40/63] Remove extra newline. --- tasks/workstation/linux/software/flatpaks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/workstation/linux/software/flatpaks.yml b/tasks/workstation/linux/software/flatpaks.yml index 58b139b..471ff31 100644 --- a/tasks/workstation/linux/software/flatpaks.yml +++ b/tasks/workstation/linux/software/flatpaks.yml @@ -24,7 +24,6 @@ method: system flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo - ## Flatpak Installs ## - name: Workstation | Linux | Flatpak Distro | Flatpak | Variables -- 2.49.0 From d6cf29d51d337a6adfe9635f41927cf0d22ea27d Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 11:52:01 -0700 Subject: [PATCH 41/63] Further enhancements to `code-reseed`, including specifying the branch and providing better output. --- tasks/general/acct_mgmt/users.yml | 44 +++++++++++++++++++------------ 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 39d2b44..960c35b 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -495,34 +495,44 @@ ' function_code_reseed: | function git_projects_to_sync { + # Projects should be followed by the current development branch name. cat <<- EOF - env-ansible - env-docker - env-termux - nodejs-website - android-break-the-habit - android-tictactoe - android-carb-up - ebook-health-protocol - flutter-expense-tracker - flutter-social-traveler-app - nodejs-social-traveler-server + env-ansible dev + env-docker dev + env-termux dev + nodejs-website dev + ebook-health-protocol dev + flutter-expense-tracker main + flutter-social-traveler-app main + nodejs-social-traveler-server main + misc-spare-change main EOF } function code-reseed { - unseed_dir="$HOME/TRASH/`date ++%Y%m%d_%H%M%S`_UnseededCodeProjects" + # Move old projects to TRASH. + unseed_dir="$HOME/TRASH/`date +%Y%m%d_%H%M%S`_UnseededCodeProjects" mkdir -pv "$unseed_dir" mv -v ~/Code/* "$unseed_dir"/ 2>/dev/null + + # Git repo information. git_repo_ssh={{ git_repo_ssh }} git_main_project={{ git_project }} git_repo_ssh_basename=${git_repo_ssh//$git_main_project/} - git_projects_to_sync | while read git_project; do - dest="$git_project" - if [[ "$dest" == "flutter-*" ]]; then - dest="${dest//-/_}" + + # Loop over project list. + git_projects_to_sync | while read git_project git_branch; do + echo -e "\n*** $git_project ***" + + # Project folder manipulation. + dest_folder="$git_project" + if [[ "$dest_folder" == "flutter-*" ]]; then + echo "- Using '_' for Flutter Project" + dest_folder="${dest_folder//-/_}" fi + + # Download of the project. git clone ${git_repo_ssh_basename}${git_project} \ - --branch dev ~/Code/$dest + --branch $git_branch ~/Code/$dest_folder done } function_clean_filenames: | -- 2.49.0 From e4d784b6c72a44e152616976965bfb853fe0c718 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 12:01:11 -0700 Subject: [PATCH 42/63] Add output for what happens initially. --- tasks/general/acct_mgmt/users.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 960c35b..8f6cdc1 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -509,7 +509,8 @@ EOF } function code-reseed { - # Move old projects to TRASH. + # Unseed current projects. + echo "*** Move old projects to TRASH ***" unseed_dir="$HOME/TRASH/`date +%Y%m%d_%H%M%S`_UnseededCodeProjects" mkdir -pv "$unseed_dir" mv -v ~/Code/* "$unseed_dir"/ 2>/dev/null -- 2.49.0 From 48777cf25c50be4ea8f73d530b64b375a35d3c1c Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 12:02:02 -0700 Subject: [PATCH 43/63] Attempt to fix Flutter project detection. --- tasks/general/acct_mgmt/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 8f6cdc1..ea6ee0b 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -526,7 +526,7 @@ # Project folder manipulation. dest_folder="$git_project" - if [[ "$dest_folder" == "flutter-*" ]]; then + if [[ "$dest_folder" == "flutter-"* ]]; then echo "- Using '_' for Flutter Project" dest_folder="${dest_folder//-/_}" fi -- 2.49.0 From ea4d4070a6fa9d466c5b3029e7c0852c6f44f69b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 12:10:36 -0700 Subject: [PATCH 44/63] Continue improving output text. --- tasks/general/acct_mgmt/users.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index ea6ee0b..ea2c03f 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -510,7 +510,7 @@ } function code-reseed { # Unseed current projects. - echo "*** Move old projects to TRASH ***" + echo -e "\n*** Move old projects to TRASH ***" unseed_dir="$HOME/TRASH/`date +%Y%m%d_%H%M%S`_UnseededCodeProjects" mkdir -pv "$unseed_dir" mv -v ~/Code/* "$unseed_dir"/ 2>/dev/null @@ -527,7 +527,7 @@ # Project folder manipulation. dest_folder="$git_project" if [[ "$dest_folder" == "flutter-"* ]]; then - echo "- Using '_' for Flutter Project" + echo "Using '_' for Flutter Project" dest_folder="${dest_folder//-/_}" fi -- 2.49.0 From a4ff66a9c9ba13c952f62c36ce4bb395084e7381 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 7 Mar 2025 12:11:17 -0700 Subject: [PATCH 45/63] Use dev branches on social traveler project so main is empty until a working version exists. --- tasks/general/acct_mgmt/users.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index ea2c03f..1d8f629 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -503,8 +503,8 @@ nodejs-website dev ebook-health-protocol dev flutter-expense-tracker main - flutter-social-traveler-app main - nodejs-social-traveler-server main + flutter-social-traveler-app dev + nodejs-social-traveler-server dev misc-spare-change main EOF } -- 2.49.0 From 17b78cc36109172bc17adce8f7433416aaa2b654 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 11:19:47 -0700 Subject: [PATCH 46/63] Goodbye isn't working anymore, try adding the shopt right before the attempt at `bye`. --- tasks/general/acct_mgmt/users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 1d8f629..041d771 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -204,6 +204,7 @@ echo "*** Completed Successfully ***" if [[ $goodbye == "Y" ]]; then + shopt -s expand_aliases bye fi -- 2.49.0 From 152635e0b3d2c0aed9be3b68e87efc4fc8225949 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 11:21:24 -0700 Subject: [PATCH 47/63] Don't do Flatpaks during goodbye. --- tasks/general/acct_mgmt/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 041d771..59df0c0 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -254,7 +254,7 @@ alias init-prog=init-program bye_aliases: | alias bye="{{ shutdown_command }}" - alias goodbye="update -yg" + alias goodbye="update -ysg" metasploit_aliases: | alias metasploit="msfconsole" alias hax="metasploit" -- 2.49.0 From 1eb41df822d0684f2f97458231d492a86ae6f190 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 20:24:10 -0700 Subject: [PATCH 48/63] Change parameter to not be an alias / function name. --- tasks/general/acct_mgmt/users.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 59df0c0..8255292 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -169,7 +169,7 @@ unset OPTIND unset accept - unset goodbye + unset shutdown unset only_sys unset only_flat @@ -178,7 +178,7 @@ h) echo -e "$usage" return 0 ;; y) accept="-y" ;; - g) goodbye="Y" ;; + g) shutdown="Y" ;; s) only_sys="Y" ;; f) only_flat="Y" ;; *) echo "ERROR: -$OPTARG is not a recognized option." >&2 @@ -193,7 +193,7 @@ {{ update_package_manager }} fi - if [[ "$goodbye" == "Y" && "{{ battery }}" == "True" ]]; then + if [[ "$shutdown" == "Y" && "{{ battery }}" == "True" ]]; then echo -e "\n*** Only System Updates - Skipping Flatpak ***\n\n" elif [[ "$only_sys" == "Y" ]]; then echo -e "\n*** Manually Skipping Flatpak ***\n\n" @@ -203,7 +203,7 @@ echo "*** Completed Successfully ***" - if [[ $goodbye == "Y" ]]; then + if [[ $shutdown == "Y" ]]; then shopt -s expand_aliases bye fi @@ -253,8 +253,12 @@ ' alias init-prog=init-program bye_aliases: | - alias bye="{{ shutdown_command }}" - alias goodbye="update -ysg" + function bye { + {{ shutdown_command }} + } + function goodbye { + update -ysg + } metasploit_aliases: | alias metasploit="msfconsole" alias hax="metasploit" -- 2.49.0 From 466d8b5de5eb902c4aa9e8002a66ce8ed6a251df Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 20:33:41 -0700 Subject: [PATCH 49/63] Update already has code to skip Flatpaks if shutting down. --- tasks/general/acct_mgmt/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 8255292..22731ac 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -257,7 +257,7 @@ {{ shutdown_command }} } function goodbye { - update -ysg + update -yg } metasploit_aliases: | alias metasploit="msfconsole" -- 2.49.0 From c7c21bc2f81a2128a2b6699d7c743a9d6a1a218b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 20:35:58 -0700 Subject: [PATCH 50/63] Add note as to why -g is for shutdown. --- tasks/general/acct_mgmt/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 22731ac..798e520 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -163,7 +163,7 @@ in one swoop. Flow stops if any command returns a failure code. The hope is to run something as easy as 'pacman -Syyu'. -y : Assume yes to any prompts. - -g : Shutdown after updating. + -g : Goodbye - Shutdown after updating. -s : System updates only, no Flatpaks. -f : Flatpaks only, no system updates." -- 2.49.0 From 69c10932894497a7eecef9fe6d6863857ad21314 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 20:36:38 -0700 Subject: [PATCH 51/63] Update usage for `update`. --- tasks/general/acct_mgmt/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 798e520..ad32b87 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -158,7 +158,7 @@ function_update: | function update() { PROG=$FUNCNAME - usage="Usage: $PROG [-y] + usage="Usage: $PROG [-y] [-g] [-s] [-f] $PROG is used to run all the system's package manager commands in one swoop. Flow stops if any command returns a failure code. The hope is to run something as easy as 'pacman -Syyu'. -- 2.49.0 From 9e61af8aa4f6a2e69c417104087c4a134fa9b0eb Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 20:38:40 -0700 Subject: [PATCH 52/63] Add aliases for update-firmware. --- tasks/general/acct_mgmt/users.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index ad32b87..f14e262 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -236,6 +236,8 @@ echo "*** Completed Successfully ***" return 0 } + alias firmware-update="update-firmware" + alias firmware-updater="update-firmware" alias_sync: alias sync='date && echo "Syncing!" && sync && date' export_editor: export EDITOR='vi' init_aliases: | -- 2.49.0 From 066c8132e96d7f9099bcb8ff044f74347e1fb475 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 19 Mar 2025 05:30:44 -0700 Subject: [PATCH 53/63] No longer using the LBRY folder. --- tasks/general/acct_mgmt/users.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index f14e262..123f72e 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -100,7 +100,6 @@ mode: '0755' loop: - "{{ user_user.home }}/bin" - - "{{ user_user.home }}/LBRY" - "{{ user_user.home }}/TRASH" - "{{ user_user.home }}/Downloads" - "{{ user_user.home }}/Reports" -- 2.49.0 From 9bb813ea78d7327e3665a245a892c85d2c0a0811 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 21 Mar 2025 10:43:45 -0700 Subject: [PATCH 54/63] Add aliases for chmod and chown showing changes. --- tasks/general/acct_mgmt/users.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 123f72e..07f148a 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -656,6 +656,9 @@ echo "$var = ${!var}" done } + alias_permission_commands: | + alias chown='chown -c' + alias chmod='chmod -c' - name: General | Account Management | Users | Files | Common Variable set_fact: @@ -718,6 +721,7 @@ {{ alias_kill_system }} {{ function_update_sdks }} {{ function_ansible_vars }} + {{ alias_permission_commands }} - name: General | Account Management | Users | Files | .bashrc blockinfile: -- 2.49.0 From 204a1fbb169bfecbd230d4437d9073aa110e6faf Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 21 Mar 2025 11:07:21 -0700 Subject: [PATCH 55/63] Hide Android Studio from taskbar. --- tasks/workstation/shared/settings/gnome.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/workstation/shared/settings/gnome.yml b/tasks/workstation/shared/settings/gnome.yml index 79900bd..9dc7169 100644 --- a/tasks/workstation/shared/settings/gnome.yml +++ b/tasks/workstation/shared/settings/gnome.yml @@ -18,7 +18,6 @@ , 'com.discordapp.Discord.desktop' , 'com.vscodium.codium.desktop' , 'codium.desktop' - , 'com.google.AndroidStudio.desktop' , 'org.shotcut.Shotcut.desktop' , 'io.lmms.LMMS.desktop' , 'io.lbry.lbry-app.desktop', 'lbry.desktop' @@ -38,6 +37,8 @@ #, 'org.godotengine.Godot.desktop' # 2025-03-07 Removed in place of a 2nd VS Codium install (apt version). #, 'com.visualstudio.code-oss.desktop', 'code-oss.desktop' +# 2025-03-21 Not really using Android Studio now that Flutter is working. +#, 'com.google.AndroidStudio.desktop' - name: Workstation | Account Management | GNOME | Facts (NixOS) set_fact: -- 2.49.0 From 4bb075b7470017726c99e1dc6554c198f1ff87bb Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 21 Mar 2025 15:07:22 -0700 Subject: [PATCH 56/63] Add a TBD file. --- tasks/general/software/hyperling.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tasks/general/software/hyperling.yml diff --git a/tasks/general/software/hyperling.yml b/tasks/general/software/hyperling.yml new file mode 100644 index 0000000..449a205 --- /dev/null +++ b/tasks/general/software/hyperling.yml @@ -0,0 +1,6 @@ +--- +# Software that I've written for personal use, to be placed in `~/bin/`. + +# TODO TBD - Add content here and place this in local.yml! :) + +# Refactor Music Library -- 2.49.0 From e155d36ab47aac13d10f367ed98fec6545599b10 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 31 Mar 2025 15:09:00 -0700 Subject: [PATCH 57/63] Fix null size variable bug with determining the default bitrate. --- files/scripts/compress_video.sh | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/files/scripts/compress_video.sh b/files/scripts/compress_video.sh index f172177..24f2d8b 100755 --- a/files/scripts/compress_video.sh +++ b/files/scripts/compress_video.sh @@ -102,25 +102,38 @@ if [[ -z "$input" ]]; then input="." fi +if [[ -z $size ]]; then + size="720" +fi +typeset -i size_int +size_int="$size" + +# Ensure the filenames sort properly between 3 and 4 digit resolutions. +while (( ${#size} < 4 )); do + size="0$size" +done +compress_tags="$size" +size="-filter:v scale=-2:$size" + if [[ -z "$video_bitrate" ]]; then # Based roughly on the 2.5 step iteration used for 720 and 1080. - if (( $size >= 2160 )); then + if (( size_int >= 2160 )); then video_bitrate="30M" - elif (( $size >= 1440 )); then + elif (( size_int >= 1440 )); then video_bitrate="12M" - elif (( $size >= 1080 )); then + elif (( size_int >= 1080 )); then video_bitrate="5M" - elif (( $size >= 720 )); then + elif (( size_int >= 720 )); then video_bitrate="2000k" - elif (( $size >= 480 )); then + elif (( size_int >= 480 )); then video_bitrate="750k" - elif (( $size >= 360 )); then + elif (( size_int >= 360 )); then video_bitrate="250k" else video_bitrate="100k" fi fi -compress_tags="$video_bitrate" +compress_tags="$compress_tags-$video_bitrate" video_bitrate="-b:v $video_bitrate -minrate 0 -maxrate $video_bitrate -bufsize $video_bitrate" if [[ -z "$audio_bitrate" ]]; then @@ -145,15 +158,6 @@ else time_command="$time_command -p" fi -if [[ -z $size ]]; then - size="720" -fi -while (( ${#size} < 4 )); do - size="0$size" -done -compress_tags="$size-$compress_tags" -size="-filter:v scale=-2:$size" - ## Main ## if [[ "$verbose" == "Y" ]]; then -- 2.49.0 From e308beec0777e8f04015a614d19cc0b3ee2c05e3 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 3 Apr 2025 10:34:51 -0700 Subject: [PATCH 58/63] Do the size as an extra extension so that it is no longer cleaned into the date. --- files/scripts/compress_image.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/scripts/compress_image.sh b/files/scripts/compress_image.sh index 0bc32cc..66d897c 100755 --- a/files/scripts/compress_image.sh +++ b/files/scripts/compress_image.sh @@ -110,8 +110,7 @@ $search "$location" | sort | while read image; do continue fi - - new_image="${image//.$extension/}.$tag-$date_YYYYMMDD-$size.$extension" + new_image="${image//.$extension/}.$tag-$date_YYYYMMDD.$size.$extension" ## Clean Filename ## # Prevent directory from having its name cleaned too. -- 2.49.0 From 3bca080de1d3bb0e63359c70ef22bb21d3110309 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 3 Apr 2025 14:50:01 -0700 Subject: [PATCH 59/63] UNTESTED: Add cleaning of the video filename. --- files/scripts/compress_video.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/files/scripts/compress_video.sh b/files/scripts/compress_video.sh index 24f2d8b..4d14a04 100755 --- a/files/scripts/compress_video.sh +++ b/files/scripts/compress_video.sh @@ -48,7 +48,8 @@ function usage { -r : Recurse the entire directory structure, compressing all video files. -f : Force recompressing any files by deleting it if it already exists. -d : Delete the original video if the compressed version is smaller. - -A : Recursively Force and Delete. + -l : Clean the filename of dashes and underscores so dates line up. + -A : Recursively Force, Delete, and Clean. -m : Measure the time it takes to compress each video and do the loop. -V : Add verbosity, such as printing all the variable values. -x : Set the shell's x flag to display every action which is taken. @@ -59,7 +60,7 @@ function usage { ## Parameters ## -while getopts ":i:v:a:c:s:rfdAmVxh" opt; do +while getopts ":i:v:a:c:s:rfdlAmVxh" opt; do case $opt in i) input="$OPTARG" ;; @@ -77,7 +78,9 @@ while getopts ":i:v:a:c:s:rfdAmVxh" opt; do ;; d) delete="Y" ;; - A) search_command="find" && force="Y" && delete="Y" + l) clean="Y" + ;; + A) search_command="find" && force="Y" && delete="Y" #&& clean="Y" ;; m) time_command="`which time`" ;; @@ -212,21 +215,33 @@ $search_command "$input" | sort | while read file; do continue fi + # TBD / TODO: Test this functionality! + new_video_clean="${newfile}" + new_video_clean="${new_video_clean//_/}" + new_video_clean="${new_video_clean//-/}" + new_video_clean="${new_video_clean// /}" + # More exception checks based on the new file. - if [[ -e "$newfile" ]]; then + if [[ -e "$newfile" || -e "$new_video_clean" ]]; then if [[ "$force" == "Y" ]]; then echo "FORCE: Removing '$newfile'." if [[ -d ~/TRASH ]]; then - mv -v "$newfile" ~/TRASH/ + mv -v "$newfile" "$new_video_clean" ~/TRASH/ 2>/dev/null else - rm -v "$newfile" + rm -v "$newfile" "$new_video_clean" 2>/dev/null fi else - echo "SKIP: Already has a compressed version ($newfile)." + echo "SKIP: Already has a compressed version." + ls -sh "$newfile" "$new_video_clean" 2>/dev/null continue fi fi + # Whether or not to use the cleaned version or the normal version. + if [[ -n $clean ]]; then + newfile="$new_video_clean" + fi + # Convert the file. echo "Converting to '$newfile'." echo "*** `date` ***" -- 2.49.0 From c828131bada7fee19bae49361ffc2fe84fa9d915 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 25 Apr 2025 08:43:15 -0700 Subject: [PATCH 60/63] Change expense tracker to DEV branch. Add the new version of the Buddy project. --- tasks/general/acct_mgmt/users.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 07f148a..3049fcc 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -508,10 +508,11 @@ env-termux dev nodejs-website dev ebook-health-protocol dev - flutter-expense-tracker main + flutter-expense-tracker dev flutter-social-traveler-app dev nodejs-social-traveler-server dev misc-spare-change main + flutter-buddy-website dev EOF } function code-reseed { -- 2.49.0 From 1e65b565cd850773dc4c09a1103a0b79d9464813 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 9 May 2025 17:41:02 -0700 Subject: [PATCH 61/63] Add GS Connect. --- tasks/general/software/packages.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/general/software/packages.yml b/tasks/general/software/packages.yml index 0796fce..a35a20a 100644 --- a/tasks/general/software/packages.yml +++ b/tasks/general/software/packages.yml @@ -137,3 +137,11 @@ state: absent when: ansible_distribution != "Ubuntu" ignore_errors: yes + +- name: General | Software | Packages | GS Connect (KDE Connect, Android Tool) + package: + name: + - gnome-shell-extension-gsconnect + state: present + when: ansible_distribution in ("Debian") + ignore_errors: yes -- 2.49.0 From 7305e3a90ce31b3f36d12ba7db34b8bf65de419a Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 18 May 2025 11:37:49 -0700 Subject: [PATCH 62/63] Add `lsusb` for Debian. --- tasks/general/software/packages.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/general/software/packages.yml b/tasks/general/software/packages.yml index a35a20a..9c78d63 100644 --- a/tasks/general/software/packages.yml +++ b/tasks/general/software/packages.yml @@ -145,3 +145,11 @@ state: present when: ansible_distribution in ("Debian") ignore_errors: yes + +- name: General | Software | Packages | Other Debian Packages + package: + name: + - usbutils + state: present + when: ansible_distribution in ("Debian") + ignore_errors: yes -- 2.49.0 From 5f63ad1a595e967dcd1795ab75256c0e45978700 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 13:59:19 -0600 Subject: [PATCH 63/63] Enahnce the docker aliases to all allow logging after the requested action. --- tasks/general/acct_mgmt/users.yml | 84 ++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 3049fcc..c41d31f 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -420,23 +420,63 @@ } alias_vim: alias vi=vim alias_here: alias here='ls -alh `pwd`/*' - alias_docker_reload: | - alias docker-reload=' + function_docker_reload: | + function docker-reload() { + if [[ "$1" == "-h" || "$1" == "--help" ]]; then + cat <<- EOF + Usage: docker-reload [container_name] + Providing the container name starts a log follow after the command. + A reload is characterized by a DOWN, BUILD, and UP. + EOF + return 0 + fi + docker compose down && docker compose build && docker compose up -d - ' - alias_docker_update: | - alias docker-update=' + + if [[ -n "$1" ]]; then + docker logs -f $1 + fi + + return 0 + } + function_docker_update: | + function docker-update() { + if [[ "$1" == "-h" || "$1" == "--help" ]]; then + cat <<- EOF + Usage: docker-update [container_name] + Providing the container name starts a log follow after the command. + An update is characterized by a DOWN, PULL, BUILD, and UP. + EOF + return 0 + fi + docker compose down && docker compose pull && docker compose build && docker compose up -d - ' + + if [[ -n "$1" ]]; then + docker logs -f $1 + fi + + return 0 + } function_docker_upgrade: | function docker-upgrade() { # Wrapper for a full-scale upgrade and log view of a container. - # Paramaters: + + if [[ "$1" == "-h" || "$1" == "--help" ]]; then + cat <<- EOF + Usage: docker-upgrade [container_name] + Providing the container name starts a log follow after the command. + An upgrade is characterized by a DOWN, PULL, BUILD, and UP. + EOF + return 0 + fi + + # Parameters: # 1) Container ID or Container Name, as seen in 'docker ps' command. container=$1 if [[ -z $container ]]; then @@ -466,9 +506,29 @@ echo "*** Following Log ***" && echo "Press ^C to escape." && docker logs -f $container + + return 0 + } + function_docker_restart: | + function docker-restart() { + if [[ "$1" == "-h" || "$1" == "--help" ]]; then + cat <<- EOF + Usage: docker-restart [container_name] + Providing the container name starts a log follow after the command. + A restart is characterized by a DOWN and UP. + EOF + return 0 + fi + + docker compose down && + docker compose up -d + + if [[ -n "$1" ]]; then + docker logs -f $1 + fi + + return 0 } - alias_docker_restart: | - alias docker-restart='docker compose down && docker compose up -d' alias_code_check: | alias code-check=' echo "Checking ~/Code directory for git changes." @@ -703,10 +763,10 @@ {{ function_flatpak_purge }} {{ alias_vim }} {{ alias_here }} - {{ alias_docker_reload }} - {{ alias_docker_update }} + {{ function_docker_reload }} + {{ function_docker_update }} {{ function_docker_upgrade }} - {{ alias_docker_restart }} + {{ function_docker_restart }} {{ alias_code_check }} {{ alias_code_reset }} {{ function_code_reseed }} -- 2.49.0