Elminate usage of "BOOL == true".

This commit is contained in:
me
2026-10-02 07:51:10 -07:00
parent 198a731f9e
commit 0a820394bb
14 changed files with 88 additions and 87 deletions
+1
View File
@@ -10,3 +10,4 @@ warn_list:
- ignore-errors
- no-changed-when
- yaml[indentation]
- yaml[comments]
+19 -19
View File
@@ -42,7 +42,7 @@
- name: Main | Start | Notify | Add Message
shell : echo "'Ansible' 'Provisioning started @ `date`'" >> "{{ notify_log_file }}"
when: workstation == true
when: workstation
####### NixOS #######
# Install the .nix files and do a little data setup.
@@ -70,7 +70,7 @@
# time to start looking into home-manager but still not wanting to
# maintain two different GNOME setups. HMMMM!
- include_tasks: tasks/workstation/shared/settings/gnome.yml
when: workstation == true
when: workstation
# Try including these. Really need to get NixOS working with the rest!
#- include_tasks: tasks/general/software/telegraf.yml # "Could not find a module for unknown.""
@@ -120,7 +120,7 @@
- include_tasks: tasks/general/software/metasploit.yml
when: provision == true
when: provision
####### Workstations #######
@@ -132,7 +132,7 @@
## Desktop Environments ##
- include_tasks: tasks/workstation/freebsd/software/gpu.yml
when: ansible_system == "FreeBSD" and bsd_gpu == true
when: ansible_system == "FreeBSD" and bsd_gpu
# Window Managers without true Desktop Environments #
- include_tasks: tasks/workstation/shared/software/dwm.yml
@@ -149,7 +149,7 @@
- include_tasks: tasks/workstation/linux/software/cinnamon.yml
- include_tasks: tasks/workstation/linux/software/lxqt.yml
when: ansible_system == "Linux"
# TBD: Implement this: and extra_desktops == true
# TBD: Implement this: and extra_desktops
## Software Tasks ##
- block:
@@ -183,10 +183,10 @@
- include_tasks: tasks/workstation/shared/settings/nfs.yml
- include_tasks: tasks/workstation/shared/settings/rdp.yml
when: rdp == true
when: rdp
- include_tasks: tasks/workstation/shared/settings/vnc.yml
when: vnc == true
when: vnc
- include_tasks: tasks/workstation/shared/settings/services.yml
- include_tasks: tasks/workstation/shared/settings/templates.yml
@@ -200,7 +200,7 @@
- include_tasks: tasks/workstation/linux/software/android.yml
when: ansible_system == "Linux"
when: workstation == true
when: workstation
# No longer mining, this is now considered deprecated.
@@ -228,20 +228,20 @@
# ### GPU Section ###
# ## Drivers ##
# - include_tasks: tasks/miner/drivers/amdgpu.yml
# when: ansible_distribution == "Ubuntu" and amdgpu == true
# when: ansible_distribution == "Ubuntu" and amdgpu
#
# # Ethereum #
# - include_tasks: tasks/miner/software/ethminer.yml
# when: ethminer == true
# when: ethminer
#
# - include_tasks: tasks/miner/software/nanominer.yml
# when: nanominer == true
# when: nanominer
#
# ##### Scheduling #####
# - include_tasks: tasks/miner/cron/ansible.yml
# - include_tasks: tasks/miner/cron/mfn.yml
#
# when: miner == true
# when: miner
####### Servers #######
@@ -254,23 +254,23 @@
- block:
- include_tasks: tasks/server/software/certbot.yml
- include_tasks: tasks/server/cron/certbot.yml
when: certbot == true
when: certbot
- block:
- include_tasks: tasks/server/software/onlyoffice.yml
when: onlyoffice == true
when: onlyoffice
- include_tasks: tasks/server/software/influxdb1.yml
when: influxdb1 == true
when: influxdb1
- include_tasks: tasks/server/software/influxdb2.yml
when: influxdb2 == true
when: influxdb2
- include_tasks: tasks/server/software/grafana.yml
when: grafana == true
when: grafana
when: ansible_pkg_mgr == "apt"
- include_tasks: tasks/server/software/hugo.yml
when: hugo == true
when: hugo
when: server == true
when: server
####### Reporting #######
+1 -1
View File
@@ -116,7 +116,7 @@
loop:
- "{{ user_user.home }}/Code"
become_user: "{{ user }}"
when: user_user.home != "" and coding == true
when: user_user.home != "" and coding
- name: General | Account Management | Users | Home Permissions
shell: "chmod 700 {{ user_user.home }}/../*"
+3 -3
View File
@@ -5,7 +5,7 @@
set_fact:
metasploit_installer: msfinstall
when: ansible_system in ("Linux", "Darwin")
and pentesting == true
and pentesting
- name: General | Software | Metasploit | Check Install Status
stat:
@@ -21,7 +21,7 @@
- "mv -fv /etc/apt/preferences.d/pin-metasploit.pref /tmp/apt/pin-metasploit.pref.old"
when: ansible_system in ("Linux") and ansible_pkg_mgr == "apt"
and not metasploit_status.stat.exists
and pentesting == true
and pentesting
ignore_errors: true
- name: General | Software | Metasploit | Install
@@ -34,7 +34,7 @@
- yes y | "{{ global_bin }}/{{ metasploit_installer }}"
when: ansible_system in ("Linux", "Darwin")
and not metasploit_status.stat.exists
and pentesting == true
and pentesting
- name: General | Software | Metasploit | Remove (Darwin)
shell: "{{ item }}"
+11 -11
View File
@@ -3,24 +3,24 @@
## Dependencies ##
- name: Miner | Software | Ethminer | Install Dependencies
package:
name:
- build-essential
- dkms
- cmake
- perl
- libdbus-1-dev
package:
name:
- build-essential
- dkms
- cmake
- perl
- libdbus-1-dev
- mesa-common-dev
state: present
- name: Miner | Software | Ethminer | Add PPA
apt_repository:
apt_repository:
repo: ppa:ethereum/ethereum
update_cache: yes
state: present
- name: Miner | Software | Ethminer | Install Ethereum
package:
package:
name: ethereum
state: present
@@ -69,12 +69,12 @@
set_fact:
opencl_flag: "ON"
sys_opencl_flag: "OFF"
when: amdgpu == true
when: amdgpu
- name: Miner | Software | Ethminer | Determine CUDA Flag
set_fact:
cuda_flag: "ON"
when: nvidia == true
when: nvidia
- name: Miner | Software | Ethminer | Determine DBUS Flag
set_fact:
+1 -1
View File
@@ -13,4 +13,4 @@
special_time: weekly
state: present
disabled: no
when: certbot == true and certbot.stdout is defined
when: certbot and certbot.stdout is defined
@@ -26,14 +26,14 @@
name:
- vscode
state: present
when: coding == true
when: coding
- name: Workstation | FreeBSD | Software | Packages | Coding | Install
package:
name:
- vscode
state: absent
when: not coding == true
when: not coding
# Media Editors #
@@ -63,7 +63,7 @@
- 0ad
- supertuxkart
state: present
when: gaming == true
when: gaming
- name: Workstation | FreeBSD | Software | Packages | Gaming | Install
package:
@@ -71,4 +71,4 @@
- 0ad
- supertuxkart
state: absent
when: not gaming == true
when: not gaming
+21 -21
View File
@@ -156,7 +156,7 @@
get_checksum: false
get_mime: false
register: android_sdkmanager_temp_stat
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [2/2]
stat:
@@ -165,7 +165,7 @@
get_checksum: false
get_mime: false
register: android_sdkmanager_check
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | Check Download Exists
stat:
@@ -174,7 +174,7 @@
get_checksum: false
get_mime: false
register: android_download_stat
when: coding == true
when: coding
## Packages ##
@@ -190,14 +190,14 @@
- "{{ bzip }}"
- "{{ android_udev }}"
state: present
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | Dependencies [Remove]
package:
name:
- "{{ android_sdkmanager }}"
state: absent
when: coding == true
when: coding
and ansible_pkg_mgr == "apt"
## Install SDK ##
@@ -230,7 +230,7 @@
group: "{{ user }}"
become_user: "{{ user }}"
when: coding == true
when: coding
and not android_sdkmanager_temp_stat.stat.exists
- name: Workstation | Linux | Software | Android | Delete Archive
@@ -249,7 +249,7 @@
- platform-tools
- emulator
become_user: "{{ user }}"
when: coding == true
when: coding
and not android_sdkmanager_check.stat.exists
# These are safe to run multiple times, and uses the new `latest` version.
@@ -269,7 +269,7 @@
changed_when: "'INSTALLED' in install_required.stdout"
failed_when: "'FAILED' in install_required.stdout"
become_user: "{{ user }}"
when: coding == true
when: coding
# Add more versions for testing across all the important platforms.
- name: Workstation | Linux | Software | Android | Install | Additional Modules
@@ -288,8 +288,8 @@
changed_when: "'INSTALLED' in install_additional.stdout"
failed_when: "'FAILED' in install_additional.stdout"
become_user: "{{ user }}"
when: coding == true
and sdks == true
when: coding
and sdks
# Remove extra downloads if system is not meant for full amount of testing.
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
@@ -328,36 +328,36 @@
changed_when: "'REMOVED' in remove_unused.stdout"
failed_when: "'FAILED' in remove_unused.stdout"
become_user: "{{ user }}"
when: coding == true
when: coding
# Report the currently installed packges.
- name: Workstation | Linux | Software | Android | Report Modules
shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}"
become_user: "{{ user }}"
when: coding == true
when: coding
## Flutter and Licenses ##
- name: Workstation | Linux | Software | Android | Inform Flutter
shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}"
become_user: "{{ user }}"
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | License Agreements [1/2]
shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}"
become_user: "{{ user }}"
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | License Agreements [2/2]
shell: "yes | {{ flutter }} doctor --android-licenses"
become_user: "{{ user }}"
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report
shell: "{{ item }}"
loop: "{{ flutter_report_commands }}"
become_user: "{{ user }}"
when: coding == true
when: coding
## Configure Environment ##
@@ -374,7 +374,7 @@
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: true
when: coding == true
when: coding
and user_root.home != ""
and user_user.home != ""
@@ -391,7 +391,7 @@
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: true
when: coding == true
when: coding
and user_root.home != ""
and user_user.home != ""
@@ -401,7 +401,7 @@
file:
path: "{{ android_sdk_location }}"
state: absent
when: not coding == true
when: not coding
## User Tools ##
# Only needed from repo if not a development device,
@@ -413,7 +413,7 @@
- "{{ android_fastboot }}"
- "{{ android_adb }}"
state: present
when: not coding == true
when: not coding
- name: Workstation | Linux | Software | Android | System Tools [Remove]
package:
@@ -421,4 +421,4 @@
- "{{ android_fastboot }}"
- "{{ android_adb }}"
state: absent
when: coding == true
when: coding
+10 -10
View File
@@ -131,7 +131,7 @@
state: present
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: coding == true
when: coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executables
blockinfile:
@@ -145,7 +145,7 @@
create: yes
loop: "{{ flatpaks_coding }}"
become_user: "{{ user }}"
when: coding == true
when: coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executable Permissions
file:
@@ -153,7 +153,7 @@
state: file
mode: '0755'
loop: "{{ flatpaks_coding }}"
when: coding == true
when: coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Uninstall
flatpak:
@@ -162,7 +162,7 @@
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: not coding == true
when: not coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Remove Executables
file:
@@ -170,7 +170,7 @@
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: not coding == true
when: not coding
# Media Editors #
@@ -279,7 +279,7 @@
state: present
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: gaming == true
when: gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executables
blockinfile:
@@ -293,7 +293,7 @@
create: yes
loop: "{{ flatpaks_gaming }}"
become_user: "{{ user }}"
when: gaming == true
when: gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executable Permissions
file:
@@ -301,7 +301,7 @@
state: file
mode: '0755'
loop: "{{ flatpaks_gaming }}"
when: gaming == true
when: gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Uninstalls
flatpak:
@@ -310,7 +310,7 @@
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: not gaming == true
when: not gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Remove Executables
file:
@@ -318,7 +318,7 @@
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: not gaming == true
when: not gaming
# Removals #
+9 -9
View File
@@ -58,7 +58,7 @@
- "{{ mesa }}"
- "{{ mesa_utils }}"
state: present
when: coding == true
when: coding
# https://docs.flutter.dev/get-started/install/linux/desktop
- name: Workstation | Linux | Software | Flutter | Linux App Dependencies
@@ -73,7 +73,7 @@
- "{{ xz_libs }}"
- "{{ cpp }}"
state: present
when: coding == true
when: coding
# https://docs.flutter.dev/get-started/install/linux/android
- name: Workstation | Linux | Software | Flutter | Android App Dependencies
@@ -84,7 +84,7 @@
- "{{ z_libs }}"
- "{{ bzip }}"
state: present
when: coding == true
when: coding
## Install SDK ##
@@ -116,14 +116,14 @@
group: "{{ user }}"
become_user: "{{ user }}"
when: coding == true
when: coding
and not flutter_sdk_stat.stat.exists
- name: Workstation | Linux | Software | Flutter | Delete Archive
file:
path: "{{ flutter_download_file }}"
state: absent
when: coding == true
when: coding
## Configure Environment ##
@@ -140,7 +140,7 @@
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true
when: coding
and user_root.home != ""
and user_user.home != ""
@@ -157,7 +157,7 @@
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true
when: coding
and user_root.home != ""
and user_user.home != ""
@@ -167,7 +167,7 @@
shell: "{{ item }}"
loop: "{{ flutter_report_commands }}"
become_user: "{{ user }}"
when: coding == true
when: coding
## Uninstall SDK ##
@@ -175,4 +175,4 @@
file:
path: "{{ flutter_sdk_location }}"
state: absent
when: not coding == true
when: not coding
+3 -3
View File
@@ -39,7 +39,7 @@
repo: ppa:lutris-team/lutris
update_cache: yes
state: present
when: ansible_distribution in ("Ubuntu") and gaming == true
when: ansible_distribution in ("Ubuntu") and gaming
ignore_errors: yes
- name: Workstation | Linux | Software | Lutris | Add PPA (Debian)
@@ -51,7 +51,7 @@
- "echo 'deb [signed-by={{ lutris_keyfile }}] https://download.opensuse.org/repositories/home:/strycore/Debian_13/ ./' \
| 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
when: ansible_distribution in ("Debian") and gaming and not lutris_source_exists.stat.exists
## Install Package ##
@@ -60,7 +60,7 @@
name:
- lutris
state: present
when: ansible_architecture != "aarch64" and gaming == true
when: ansible_architecture != "aarch64" and gaming
## Uninstall Package ##
+1 -1
View File
@@ -44,4 +44,4 @@
state: present
when: ansible_pkg_mgr != "apt"
when: coding == true
when: coding
@@ -66,7 +66,7 @@
name:
- gimp
state: present
when: editing == true
when: editing
- name: Workstation | Linux | Software | Packages | Install Audio (Looking at you, Artix)
package:
+3 -3
View File
@@ -20,7 +20,7 @@
- firefox-esr
- visual-studio-code
status: present
when: coding == true
when: coding
- name: Workstation | Mac OS | Software | Brew | Install Packages (Editing:Video)
package:
@@ -42,14 +42,14 @@
- battle-net
- steam
status: present
when: gaming == true
when: gaming
- name: Workstation | Mac OS | Software | Brew | Install Packages (Cycling)
package:
name:
- zwift
status: present
when: cycling == true
when: cycling
#- name: Workstation | Mac OS | Software | Brew | Remove Packages
# package: