Chad
7519f23a81
* Fix metasplot install if /usr/local/bin is not active in path yet. Also use variables. * Use plocate on openSUSE. Supposed to be faster. Cannot have both m and p installed at the same time and p comes with the base system. * Include wheel group for user as well. * Finalize GNOME settings, go with RC commands instead of dconf module. * Add hostname to report files. * Add TBD for shared home situation. * Fix cron service for Fedora. * Disable the power button. * Fix Fedora ffmpeg issues. Move package modules from flatpak playbook. Uninstall firefox from package manager. * Enhance update function to handle shared home between multiple distributions. * Allow keeping local backups of files. * Replace flatpak repair check with accept flag instead of battery so that any automated update runs do the cleanup. * Begin hoarding settings files. * Start building out a FireFox profile. * Fix extra comment command in comment. * Add an All option to completely compress the entire directory. * Codium is still broken on all tested systems, hide from Favorites. * Add scipt to handle audio files. Also can convert to 432Hz. * Use cut instead of awk to get rid of first parameter. Fixes bugs when spaces are allowed in the filenames. * Enhancements and bugfix for "$freq". * Add playbook for desktop VPN clients. Start with Mullvad. * Add website to the seeded projects. * Add firmware updates to the update function. * Allow `fwupdmgr` to fail and have `update` still continue. * Shorten lines. * Uninstall DeltaChat. * Separate the firmware update into its own function. * Add alias for cloning one folder to another without using rm/cp. * Fix typo in rsync. * Go ahead and add extra options. * Make the files human readable size descriptions. * Remove unnecessary v, P does good enough.
248 lines
7.9 KiB
YAML
248 lines
7.9 KiB
YAML
---
|
|
# Harmonize systems rather than doing everything manually. :)
|
|
|
|
# Setup of any device connected to this repo.
|
|
- name: Main | Default Setup
|
|
hosts: localhost
|
|
connection: local
|
|
become: true
|
|
|
|
tasks:
|
|
|
|
####### Gather #######
|
|
# Load facts for all systems.
|
|
|
|
- include_tasks: facts/general/gather.yml
|
|
- include_tasks: tasks/general/acct_mgmt/provision_config.yml
|
|
|
|
- include_tasks: facts/general/system.yml
|
|
- include_tasks: facts/general/package.yml
|
|
- include_tasks: facts/general/service.yml
|
|
- include_tasks: facts/general/user.yml
|
|
|
|
|
|
####### NixOS #######
|
|
# Install the .nix files and do a little data setup.
|
|
|
|
- name: Main | NixOS Setup
|
|
block:
|
|
|
|
- include_tasks: tasks/general/software/nixos.yml
|
|
|
|
|
|
# TBD if we are going to use this many, then just have IF statements
|
|
# and use blocks within the General area for NixOS vs not-NixOS.
|
|
- include_tasks: tasks/general/software/swap.yml
|
|
|
|
- include_tasks: tasks/general/acct_mgmt/groups.yml
|
|
- include_tasks: tasks/general/acct_mgmt/users.yml
|
|
- include_tasks: tasks/general/acct_mgmt/sudo.yml
|
|
- include_tasks: tasks/general/acct_mgmt/doas.yml
|
|
|
|
- include_tasks: tasks/general/scripts/root.yml
|
|
- include_tasks: tasks/general/scripts/user.yml
|
|
- include_tasks: tasks/general/scripts/install.yml
|
|
|
|
- include_tasks: tasks/general/cron/ansible.yml
|
|
|
|
# psutil does not work in NixOS. Cannot figure out how to fix it. Maybe
|
|
# 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
|
|
|
|
# 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.""
|
|
- include_tasks: tasks/general/tests/services.yml
|
|
- include_tasks: tasks/general/tests/lynis.yml
|
|
- include_tasks: tasks/general/tests/nmap.yml
|
|
|
|
- name: NixOS | Complete
|
|
meta: end_play
|
|
|
|
when: ansible_distribution == "NixOS"
|
|
|
|
|
|
####### General #######
|
|
# Basic setup for all enabled systems.
|
|
|
|
- name: Main | General Setup
|
|
block:
|
|
|
|
- include_tasks: tasks/general/software/swap.yml
|
|
- include_tasks: tasks/general/software/packages.yml
|
|
- include_tasks: tasks/general/software/services.yml
|
|
- include_tasks: tasks/general/software/sendmail.yml
|
|
when: ansible_system == "FreeBSD"
|
|
|
|
|
|
# Gather again in case missing programs have now been installed.
|
|
- include_tasks: facts/general/gather.yml
|
|
|
|
- include_tasks: tasks/general/acct_mgmt/groups.yml
|
|
- include_tasks: tasks/general/acct_mgmt/users.yml
|
|
- include_tasks: tasks/general/acct_mgmt/sudo.yml
|
|
- include_tasks: tasks/general/acct_mgmt/doas.yml
|
|
|
|
- include_tasks: tasks/general/scripts/root.yml
|
|
- include_tasks: tasks/general/scripts/user.yml
|
|
- include_tasks: tasks/general/scripts/install.yml
|
|
|
|
- include_tasks: tasks/general/cron/ansible.yml
|
|
|
|
# TODO Need to refactor. Maybe tasks/general/cron/freebsd.yml
|
|
- include_tasks: tasks/workstation/freebsd/cron/ansible.yml
|
|
when: ansible_system == "FreeBSD"
|
|
|
|
- include_tasks: tasks/general/software/metasploit.yml
|
|
when: pentesting == true
|
|
|
|
when: provision == true
|
|
|
|
|
|
####### Workstations #######
|
|
# Additional setup for systems with GUI.
|
|
|
|
- name: Main | Workstation Setup
|
|
block:
|
|
|
|
- include_tasks: facts/workstation/package.yml
|
|
|
|
# Set Up Desktop Environments #
|
|
- include_tasks: tasks/workstation/freebsd/software/gpu.yml
|
|
when: ansible_system == "FreeBSD" and bsd_gpu == true
|
|
|
|
- include_tasks: tasks/workstation/freebsd/software/gnome.yml
|
|
when: ansible_system == "FreeBSD"
|
|
|
|
- include_tasks: tasks/workstation/linux/software/gnome.yml
|
|
when: ansible_system == "Linux"
|
|
|
|
- include_tasks: tasks/workstation/shared/software/dwm.yml
|
|
|
|
# Software Tasks #
|
|
- include_tasks: tasks/workstation/linux/software/packages.yml
|
|
when: ansible_system == "Linux"
|
|
|
|
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
|
|
when: ansible_system == "Linux" and flatpak_distro
|
|
|
|
- include_tasks: tasks/workstation/linux/software/brave.yml
|
|
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
|
|
|
|
- include_tasks: tasks/workstation/linux/software/vpn.yml
|
|
when: ansible_system == "Linux"
|
|
|
|
- include_tasks: tasks/workstation/freebsd/software/packages.yml
|
|
when: ansible_system == "FreeBSD"
|
|
|
|
- include_tasks: tasks/workstation/mac-os/software/brew.yml
|
|
when: ansible_system == "Darwin"
|
|
|
|
# Configuration Tasks #
|
|
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
|
when: not mobile
|
|
|
|
- include_tasks: tasks/workstation/linux/cron/ansible.yml
|
|
when: ansible_system == "Linux" and not mobile
|
|
|
|
- include_tasks: tasks/workstation/shared/settings/nfs.yml
|
|
|
|
- include_tasks: tasks/workstation/shared/settings/rdp.yml
|
|
when: rdp == true
|
|
|
|
- include_tasks: tasks/workstation/shared/settings/vnc.yml
|
|
when: vnc == true
|
|
|
|
- include_tasks: tasks/workstation/shared/settings/services.yml
|
|
|
|
when: workstation == true
|
|
|
|
|
|
# No longer mining, this is now considered deprecated.
|
|
# ####### Miners #######
|
|
#
|
|
# # Additional setup for miners.
|
|
# - name: Main | Miner Setup
|
|
# block:
|
|
#
|
|
# ##### Setup #####
|
|
# - include_tasks: tasks/miner/debug.yml
|
|
#
|
|
# - include_tasks: tasks/miner/acct_mgmt/users.yml
|
|
#
|
|
# - include_tasks: facts/miner/system.yml
|
|
# - include_tasks: facts/miner/config.yml
|
|
# - include_tasks: facts/miner/pool.yml
|
|
#
|
|
# ##### Installations #####
|
|
# ### CPU SECTION ###
|
|
# # Monero #
|
|
# - include_tasks: tasks/miner/software/xmr-stak-cpu.yml
|
|
# when: xmr_stak_cpu is defined
|
|
#
|
|
# ### GPU Section ###
|
|
# ## Drivers ##
|
|
# - include_tasks: tasks/miner/drivers/amdgpu.yml
|
|
# when: ansible_distribution == "Ubuntu" and amdgpu == true
|
|
#
|
|
# # Ethereum #
|
|
# - include_tasks: tasks/miner/software/ethminer.yml
|
|
# when: ethminer == true
|
|
#
|
|
# - include_tasks: tasks/miner/software/nanominer.yml
|
|
# when: nanominer == true
|
|
#
|
|
# ##### Scheduling #####
|
|
# - include_tasks: tasks/miner/cron/ansible.yml
|
|
# - include_tasks: tasks/miner/cron/mfn.yml
|
|
#
|
|
# when: miner == true
|
|
|
|
|
|
####### Servers #######
|
|
# Easy to deploy server configurations.
|
|
|
|
- name: Main | Server Setup
|
|
block:
|
|
|
|
- include_tasks: tasks/server/software/services.yml
|
|
|
|
- include_tasks: tasks/server/software/certbot.yml
|
|
when: certbot == true
|
|
- include_tasks: tasks/server/cron/certbot.yml
|
|
when: certbot == true
|
|
|
|
- include_tasks: tasks/server/software/onlyoffice.yml
|
|
when: onlyoffice == true and ansible_pkg_mgr == "apt"
|
|
|
|
- include_tasks: tasks/server/software/influxdb1.yml
|
|
when: influxdb1 == true and ansible_pkg_mgr == "apt"
|
|
|
|
- include_tasks: tasks/server/software/influxdb2.yml
|
|
when: influxdb2 == true and ansible_pkg_mgr == "apt"
|
|
|
|
- include_tasks: tasks/server/software/grafana.yml
|
|
when: grafana == true and ansible_pkg_mgr == "apt"
|
|
|
|
- include_tasks: tasks/server/software/hugo.yml
|
|
when: hugo == true
|
|
|
|
- include_tasks: tasks/server/software/gitlab.yml
|
|
when: gitlab and ansible_pkg_mgr in ("apt", "dnf") and ansible_distribution not in ("Fedora")
|
|
|
|
- include_tasks: tasks/server/software/git.yml
|
|
when: git and ansible_pkg_mgr in ("apt")
|
|
|
|
when: server == true
|
|
|
|
|
|
####### Reporting #######
|
|
# Provide information for analysis.
|
|
|
|
- include_tasks: tasks/general/software/telegraf.yml
|
|
|
|
- include_tasks: tasks/general/tests/services.yml
|
|
- include_tasks: tasks/general/tests/lynis.yml
|
|
- include_tasks: tasks/general/tests/nmap.yml
|