From 791dc245a6dcf2ad7c95daa9b4885f59cbe9e5ff Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 10 Jan 2022 13:41:54 +0000 Subject: [PATCH] General Improvements + Miner Deprecation (#23) * Add volume key controls. * Add placeholder for LBRY app. * Refactor gui into gnome and packages. Remove deprecated lineinfiles. Enhance package management. * Variablize tar to fix FreeBSD. * Variablize tar to fix FreeBSD. * Take FreeBSD gui.yml refactor into account. * Unfinished changes to use self-signed cert so local traffic can hit https. Server starts fine, but getting "gnutls_handshake() failed: An unexpected TLS packet was received." on client's `git clone`. * Make D2D optional. FreeBSD is still having a hard time compiling it. * Use a block for Dash To Dock so only one ignore_errors is necessary. * Deprecate miner section since machines have been decommissioned. * Remove deprecated file. * Switch to lightdm on FreeBSD. * Automate GPU driver installation. * Updated DWM config and added TODO's. * Move lynis to src folder for cleanliness. * Remove debug. * Refactor for "shared" system type folder. * Fix FreeBSD gpu.yml location. * Add a default hosts file to hide warnings. --- facts/general/package.yml | 4 + facts/general/system.yml | 2 +- files/dwm/config.h | 12 +- files/dwm/dwm.sh | 21 +- hosts | 128 +--------- local.yml | 100 ++++---- tasks/general/acct_mgmt/provision_config.yml | 163 ++++++------ tasks/general/finish.yml | 5 - tasks/general/software/packages.yml | 2 +- tasks/server/software/git.yml | 53 ++-- tasks/workstation/freebsd/software/gnome.yml | 43 ++++ tasks/workstation/freebsd/software/gpu.yml | 17 ++ tasks/workstation/freebsd/software/gui.yml | 63 ----- tasks/workstation/freebsd/software/lbry.yml | 4 + .../workstation/freebsd/software/packages.yml | 74 ++++++ .../{ => shared}/settings/gnome.yml | 240 +++++++++--------- .../workstation/{ => shared}/settings/nfs.yml | 0 .../workstation/{ => shared}/settings/rdp.yml | 0 .../{ => shared}/settings/services.yml | 0 .../workstation/{ => shared}/settings/vnc.yml | 0 .../{linux => shared}/software/dwm.yml | 5 + 21 files changed, 468 insertions(+), 468 deletions(-) create mode 100644 tasks/workstation/freebsd/software/gnome.yml create mode 100644 tasks/workstation/freebsd/software/gpu.yml delete mode 100644 tasks/workstation/freebsd/software/gui.yml create mode 100644 tasks/workstation/freebsd/software/lbry.yml create mode 100644 tasks/workstation/freebsd/software/packages.yml rename tasks/workstation/{ => shared}/settings/gnome.yml (51%) rename tasks/workstation/{ => shared}/settings/nfs.yml (100%) rename tasks/workstation/{ => shared}/settings/rdp.yml (100%) rename tasks/workstation/{ => shared}/settings/services.yml (100%) rename tasks/workstation/{ => shared}/settings/vnc.yml (100%) rename tasks/workstation/{linux => shared}/software/dwm.yml (84%) diff --git a/facts/general/package.yml b/facts/general/package.yml index 218cd06..c2d35c7 100644 --- a/facts/general/package.yml +++ b/facts/general/package.yml @@ -13,6 +13,7 @@ sshfs: sshfs locate: locate opensshd: openssh-server + tar: tar when: ansible_pkg_mgr == "apt" - name: General | Facts | Package | pacman @@ -20,6 +21,7 @@ sshfs: sshfs locate: mlocate opensshd: openssh + tar: tar when: ansible_pkg_mgr == "pacman" - name: General | Facts | Package | FreeBSD @@ -28,6 +30,7 @@ locate: htop # Placeholder to prevent errors, locate built into FreeBSD. opensshd: htop # sshd comes installed on FreeBSD ansible_python_interpreter: "/usr/local/bin/python3.8" + tar: htop # tar already provided in FreeBSD when: ansible_system == "FreeBSD" - name: General | Facts | Package | dnf @@ -35,6 +38,7 @@ sshfs: fuse-sshfs locate: mlocate opensshd: openssh + tar: tar when: ansible_pkg_mgr == "dnf" diff --git a/facts/general/system.yml b/facts/general/system.yml index 1afac8e..609f261 100644 --- a/facts/general/system.yml +++ b/facts/general/system.yml @@ -5,7 +5,7 @@ set_fact: leet_ssh: '{{ user }}@leet' leet_drive: /mnt/leet - lynis_install_dir: /usr/local/lynis + lynis_install_dir: /usr/local/src/lynis dwm_install_dir: /usr/local/src/dwm st_install_dir: /usr/local/src/st global_bin: /usr/local/bin diff --git a/files/dwm/config.h b/files/dwm/config.h index eafa0c2..c83cd5d 100644 --- a/files/dwm/config.h +++ b/files/dwm/config.h @@ -61,10 +61,16 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "st", NULL }; +// Volume (https://varunbpatil.github.io/2013/09/28/dwm.html) +static const char *mutecmd[] = {"amixer","-q","sset","Master","toggle",NULL}; +static const char *lowervolcmd[] = {"amixer","-q","sset","Master","1%-",NULL}; +static const char *raisevolcmd[] = {"amixer","-q","sset","Master","1%+",NULL}; + static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, @@ -97,7 +103,11 @@ static Key keys[] = { TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, // Mine - { MODKEY, XK_q, killclient, {0} }, + { MODKEY, XK_q, killclient, {0} }, +// Volume (https://varunbpatil.github.io/2013/09/28/dwm.html) + { 0, 0x1008ff12,spawn, {.v = mutecmd } }, + { 0, 0x1008ff11,spawn, {.v = lowervolcmd } }, + { 0, 0x1008ff13,spawn, {.v = raisevolcmd } }, }; /* button definitions */ diff --git a/files/dwm/dwm.sh b/files/dwm/dwm.sh index d519820..31e9669 100644 --- a/files/dwm/dwm.sh +++ b/files/dwm/dwm.sh @@ -2,7 +2,7 @@ # 2021-10-30 Hyperling # Basically .xinitrc, but not placed there to avoid GDM/GNOME problems. -## System Libs ## +## Load System Libs ## if [ -d /etc/X11/xinit/xinitrc.d ]; then for f in /etc/X11/xinit/xinitrc.d/*; do @@ -11,23 +11,32 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then unset f fi +if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then + for f in /usr/local/etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi + ## Variables ## -# This doesn't work for some reason. LBRY needs it but added to its executable instead. -eval `dbus-launch` +purple="#400080" + + +## Background ## + +xsetroot -solid "$purple" ## Status Bars ## # slstatus, from Suckless # - #exec slstatus & # Custom # - while true; do - xsetroot -name "`date +"%Y-%m-%d %H:%M:%S"`" + xsetroot -name "`whoami`@`hostname` `date +"%Y-%m-%d %H:%M:%S"`" done & diff --git a/hosts b/hosts index eeed1d0..cc2ce88 100644 --- a/hosts +++ b/hosts @@ -1,130 +1,4 @@ -;;; DEPRECATION WARNING ;;; -; The move to file-based variables has begun. -; This file will be removed once all variables are converted and all hosts have been modified. -; Please see tasks/general/acct_mgmt/provision_config.yml for details. -;;; END DEPRECATION WARNING ;;; +; Configuration is managed via /usr/local/etc/hyperling-scm/*.ini files. [global] localhost - -;;; Old hosts file: -;;; [everything] -;;; ;;;;;;; Available options - all require lowercase values ;;;;;; -;;; ; -;;; ; branch : Provide the Github branch that the machine should poll. -;;; ; Example: main, dev -;;; ; -;;; ; pentesting : Set to anything to install tools such as metasploit (nmap is already provided for reporting) -;;; ; Example: true -;;; ; -;;; localhost -;;; ;dell-laptop branch=dev pentesting=true -;;; ;airbook branch=dev pentesting=true -;;; ;x570 branch=dev -;;; ;test branch=dev pentesting=true -;;; -;;; [workstation] -;;; ;;;;;;; Available options - all require lowercase values ;;;;;; -;;; ; -;;; ; coding : Define for installation of code editors (VSCode, PyCharm, Android Studio) -;;; ; -;;; ; editing : Define for installation of Audio/Video editors (Shotcut, Audacity, OBS Stdio, GIMP) -;;; ; -;;; ; gaming : Define for installation of gaming software (Steam, Lutris) -;;; ; -;;; ; rdp : Define for installation of RDP protocol -;;; ; CURRENTLY FREEBSD-ONLY -;;; ; -;;; ; vnc : Define for installation of VNC protocol -;;; ; NOT IMPLEMENTED YET -;;; ; -;;; dell-laptop coding=true editing=true gaming=true -;;; dell-inspiron coding=true gaming=true -;;; usb-workstation coding=true -;;; lbry-server-1 -;;; lbry-server-2 -;;; lbry-server-3 -;;; aspire coding=true editing=true gaming=true -;;; freeboy rdp=true -;;; airbook coding=true editing=true gaming=true -;;; -;;; [mobile] -;;; pinephone -;;; usb-mobile -;;; silicon-power -;;; -;;; [miner] -;;; ;;;;;;; Available options - all require lowercase values ;;;;;; -;;; ; amdgpu : Set to anything for installation of AMDGPU-Pro drivers on Ubuntu (20.04 preferred) -;;; ; Example: true -;;; ; -;;; ; nanominer : Set to anything for installation of nanominer -;;; ; Example: true -;;; ; -;;; ; nanominer_cpu : Set to coin code that you'd like the CPU to work on -;;; ; Valid values: xmr -;;; ; -;;; ; nanominer_cpu_pool : Set to pool organization to use for CPU mining -;;; ; Valid values: nanopool -;;; ; -;;; ; nanominer_gpu : Set to coin code that you'd like the GPU to work on -;;; ; Valid values: eth -;;; ; -;;; ; nanominer_gpus : Set to comma list of GPU devices that should be used for nanominer -;;; ; Example: 0,2,3 -;;; ; -;;; ; nanominer_gpu_pool : Set to pool organization to use for GPU mining -;;; ; Valid values: nanopool etherpool f2pool -;;; ; -;;; ; eth_minhashrate : Set to minimum hashrate over 10 minutes before restarting. Can accept M for Million and K for thousand. -;;; ; Example: 100K -;;; ; -;;; usb-miner amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu_pool=nanopool -;;; x570 amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu_pool=nanopool eth_minhashrate=50M -;;; ;x570 amdgpu=true ethminer=true -;;; -;;; [server] -;;; ;;;;;;; Parameters ;;;;;; -;;; ; -;;; ; domain : Set to the domain which gives the server its FQDN. -;;; ; Example: hyperling.com -;;; ; -;;; ; onlyoffice : Set to anything for this server to be configured as an OnlyOffice server. -;;; ; Example: true -;;; ; -;;; ; grafana : Set to anything for this server to be configured as an Grafana web server. -;;; ; Example: true -;;; ; -;;; ; influxdb1 : Set to anything for this server to be configured as an Influx 1 DB server. -;;; ; Example: true -;;; ; -;;; ; influxdb2 : Set to anything for this server to be configured as an Influx 2 DB + web server. -;;; ; Example: true -;;; ; -;;; ; certbot : Set to anything to add cron job for `certbot renew`. -;;; ; Example: true -;;; ; -;;; ; hugo : Set to anything to install HUGO static website generator. -;;; ; Example: true -;;; ; -;;; ; gitlab : ee - Installs Enterprise Edition Free Tier. Basically CE with an easier upgrade path for Paid Features. -;;; ; ce - Installs Community Edition. Excludes paid features if you'll never use them. Supposedly difficult to move to EE. -;;; ; Example: ce -;;; ; -;;; ; gitlab_url : The URL prefix for the server. Using 'http://mygitlabserver' would result in "http://mygitlabserver.{{domain}}". -;;; ; Regardless of whether you choose http or https, the Certbot config will be skipped since the maintainer uses a reverse proxy. -;;; ; Example: https://gitlab -;;; ; -;;; onlyoffice domain=hyperling.com onlyoffice=true -;;; grafana domain=hyperling.com grafana=true influxdb1=true -;;; test -;;; hyperling certbot=true -;;; hyperling.com certbot=true -;;; tmcvideos certbot=true -;;; tmcvideos.com certbot=true -;;; reverse-proxy certbot=true -;;; nextcloud -;;; wordpress certbot=true -;;; usb-server -;;; git gitlab=ce domain=hyperling.com gitlab_url=https://git -;;; gitlab gitlab=ce domain=hyperling.com gitlab_url=https://gitlab diff --git a/local.yml b/local.yml index 8ddbb1b..60df5f9 100644 --- a/local.yml +++ b/local.yml @@ -57,14 +57,16 @@ - include: facts/workstation/package.yml # Set Up Desktop Environments # - - include: tasks/workstation/freebsd/software/gui.yml + - include: tasks/workstation/freebsd/software/gpu.yml + when: ansible_system == "FreeBSD" and bsd_gpu == true + + - include: tasks/workstation/freebsd/software/gnome.yml when: ansible_system == "FreeBSD" - include: tasks/workstation/linux/software/gnome.yml when: ansible_system == "Linux" - - include: tasks/workstation/linux/software/dwm.yml - when: ansible_system in ("Linux", "FreeBSD") + - include: tasks/workstation/shared/software/dwm.yml ignore_errors: yes # Software Tasks # @@ -77,6 +79,9 @@ - include: tasks/workstation/linux/software/brave.yml when: ansible_pkg_mgr in ("apt", "dnf") + - include: tasks/workstation/freebsd/software/packages.yml + when: ansible_system == "FreeBSD" + - include: tasks/workstation/mac-os/software/brew.yml when: ansible_system == "Darwin" @@ -84,63 +89,64 @@ when: ansible_system == "Darwin" # Configuration Tasks # - - include: tasks/workstation/settings/gnome.yml + - include: tasks/workstation/shared/settings/gnome.yml - include: tasks/workstation/linux/cron/ansible.yml when: ansible_system == "Linux" - - include: tasks/workstation/settings/nfs.yml + - include: tasks/workstation/shared/settings/nfs.yml - - include: tasks/workstation/settings/rdp.yml + - include: tasks/workstation/shared/settings/rdp.yml when: rdp == true - - include: tasks/workstation/settings/vnc.yml + + - include: tasks/workstation/shared/settings/vnc.yml when: vnc == true - - include: tasks/workstation/settings/services.yml + - include: tasks/workstation/shared/settings/services.yml ignore_errors: yes when: workstation == true - - ####### Miners ####### - - # Additional setup for miners. - - name: Main | Miner Setup - block: - - ##### Setup ##### - - include: tasks/miner/debug.yml - - - include: tasks/miner/acct_mgmt/users.yml - - - include: facts/miner/system.yml - - include: facts/miner/config.yml - - include: facts/miner/pool.yml - - ##### Installations ##### - ### CPU SECTION ### - # Monero # - - include: tasks/miner/software/xmr-stak-cpu.yml - when: xmr_stak_cpu is defined - - ### GPU Section ### - ## Drivers ## - - include: tasks/miner/drivers/amdgpu.yml - when: ansible_distribution == "Ubuntu" and amdgpu == true - - # Ethereum # - - include: tasks/miner/software/ethminer.yml - when: ethminer == true - - - include: tasks/miner/software/nanominer.yml - when: nanominer == true - - ##### Scheduling ##### - - include: tasks/miner/cron/ansible.yml - - include: tasks/miner/cron/mfn.yml - - when: miner == true +# No longer mining, this is now considered deprecated. +# ####### Miners ####### +# +# # Additional setup for miners. +# - name: Main | Miner Setup +# block: +# +# ##### Setup ##### +# - include: tasks/miner/debug.yml +# +# - include: tasks/miner/acct_mgmt/users.yml +# +# - include: facts/miner/system.yml +# - include: facts/miner/config.yml +# - include: facts/miner/pool.yml +# +# ##### Installations ##### +# ### CPU SECTION ### +# # Monero # +# - include: tasks/miner/software/xmr-stak-cpu.yml +# when: xmr_stak_cpu is defined +# +# ### GPU Section ### +# ## Drivers ## +# - include: tasks/miner/drivers/amdgpu.yml +# when: ansible_distribution == "Ubuntu" and amdgpu == true +# +# # Ethereum # +# - include: tasks/miner/software/ethminer.yml +# when: ethminer == true +# +# - include: tasks/miner/software/nanominer.yml +# when: nanominer == true +# +# ##### Scheduling ##### +# - include: tasks/miner/cron/ansible.yml +# - include: tasks/miner/cron/mfn.yml +# +# when: miner == true diff --git a/tasks/general/acct_mgmt/provision_config.yml b/tasks/general/acct_mgmt/provision_config.yml index 9ad9c22..d95d9af 100644 --- a/tasks/general/acct_mgmt/provision_config.yml +++ b/tasks/general/acct_mgmt/provision_config.yml @@ -88,6 +88,9 @@ ; vnc : Set to true for installation of VNC protocol ; UNFINISHED/UNTESTED ; + ; bsd_gpu : Set to [] to install GPU driver + ; Example: amdgpu + ; [global] marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config' state: present @@ -102,6 +105,7 @@ gaming: "{{ lookup('ini', 'gaming file={{wrk_file}} default=false') }}" rdp: "{{ lookup('ini', 'rdp file={{wrk_file}} default=false') }}" vnc: "{{ lookup('ini', 'vnc file={{wrk_file}} default=false') }}" + bsd_gpu: "{{ lookup('ini', 'bsd_gpu file={{wrk_file}} default=false') }}" - name: General | Account Management | Provisioning Configuration | Workstation | List set_fact: @@ -113,86 +117,87 @@ - { 'gaming': "{{ gaming }}" } - { 'rdp': "{{ rdp }}" } - { 'vnc': "{{ vnc }}" } + - { 'bsd_gpu': "{{ bsd_gpu }}" } - -## Miner ## - -- name: General | Account Management | Provisioning Configuration | Miner | Create - blockinfile: - path: "{{ mnr_file }}" - block: | - ;;;;;;; Available options - all require lowercase values ;;;;;; - ; - ; enable : Set to true for system to be considered a miner. - ; - ; amdgpu : Set to true for installation of AMDGPU-Pro drivers on Ubuntu (20.04 preferred) - ; - ; nanominer : Set to true for installation of nanominer - ; - ; nanominer_cpu : Set to coin code that you'd like the CPU to work on - ; Valid values: xmr - ; - ; nanominer_cpu_pool : Set to pool organization to use for CPU mining - ; Valid values: nanopool - ; - ; nanominer_gpu : Set to coin code that you'd like the GPU to work on - ; Valid values: eth - ; - ; nanominer_gpus : Set to comma list of GPU devices that should be used for nanominer - ; Example: 0,2,3 - ; - ; nanominer_gpu_pool : Set to pool organization to use for GPU mining - ; Valid values: nanopool etherpool f2pool - ; - ; eth_minhashrate : Set to minimum hashrate over 10 minutes before restarting. Can accept M for Million and K for thousand. - ; Example: 100K - ; - ; ethminer : Set to true for installation of ethminer - ; UNFINISHED/UNTESTED - ; - ; nvidia : Set to true for NVidia support in ethminer. - ; UNFINISHED/UNTESTED - ; - ; xmr_stak_cpu : Set to true for istallation - ; UNFINISHED/UNTESTED - ; - [global] - marker: '; {mark} MANAGED BY ANSIBLE | Miner Config' - state: present - create: yes - backup: yes - -- name: General | Account Management | Provisioning Configuration | Miner | Load - set_fact: - miner: "{{ lookup('ini', 'enable file={{mnr_file}} default=false') }}" - amdgpu: "{{ lookup('ini', 'amdgpu file={{mnr_file}} default=false') }}" - nanominer: "{{ lookup('ini', 'nanominer file={{mnr_file}} default=false') }}" - nanominer_cpu: "{{ lookup('ini', 'nanominer_cpu file={{mnr_file}} default=false') }}" - nanominer_cpu_pool: "{{ lookup('ini', 'nanominer_cpu_pool file={{mnr_file}} default=false') }}" - nanominer_gpu: "{{ lookup('ini', 'nanominer_gpu file={{mnr_file}} default=false') }}" - nanominer_gpus: "{{ lookup('ini', 'nanominer_gpus file={{mnr_file}} default=false') }}" - nanominer_gpu_pool: "{{ lookup('ini', 'nanominer_gpu_pool file={{mnr_file}} default=false') }}" - eth_minhashrate: "{{ lookup('ini', 'eth_minhashrate file={{mnr_file}} default=false') }}" - ethminer: "{{ lookup('ini', 'ethminer file={{mnr_file}} default=false') }}" - nvidia: "{{ lookup('ini', 'nvidia file={{mnr_file}} default=false') }}" - xmr_stak_cpu: "{{ lookup('ini', 'xmr_stak_cpu file={{mnr_file}} default=false') }}" - -- name: General | Account Management | Provisioning Configuration | Miner | List - set_fact: - provision_variables: "{{ provision_variables | combine(item) }}" - loop: - - { 'miner': "{{ miner }}" } - - { 'amdgpu': "{{ amdgpu }}" } - - { 'nanominer': "{{ nanominer }}" } - - { 'nanominer_cpu': "{{ nanominer_cpu }}" } - - { 'nanominer_cpu_pool': "{{ nanominer_cpu_pool }}" } - - { 'nanominer_gpu': "{{ nanominer_gpu }}" } - - { 'nanominer_gpus': "{{ nanominer_gpus }}" } - - { 'nanominer_gpu_pool': "{{ nanominer_gpu_pool }}" } - - { 'eth_minhashrate': "{{ eth_minhashrate }}" } - - { 'ethminer': "{{ ethminer }}" } - - { 'nvidia': "{{ nvidia }}" } - - { 'xmr_stak_cpu': "{{ xmr_stak_cpu }}" } +# No longer mining, this is now considered deprecated. +### Miner ## +# +#- name: General | Account Management | Provisioning Configuration | Miner | Create +# blockinfile: +# path: "{{ mnr_file }}" +# block: | +# ;;;;;;; Available options - all require lowercase values ;;;;;; +# ; +# ; enable : Set to true for system to be considered a miner. +# ; +# ; amdgpu : Set to true for installation of AMDGPU-Pro drivers on Ubuntu (20.04 preferred) +# ; +# ; nanominer : Set to true for installation of nanominer +# ; +# ; nanominer_cpu : Set to coin code that you'd like the CPU to work on +# ; Valid values: xmr +# ; +# ; nanominer_cpu_pool : Set to pool organization to use for CPU mining +# ; Valid values: nanopool +# ; +# ; nanominer_gpu : Set to coin code that you'd like the GPU to work on +# ; Valid values: eth +# ; +# ; nanominer_gpus : Set to comma list of GPU devices that should be used for nanominer +# ; Example: 0,2,3 +# ; +# ; nanominer_gpu_pool : Set to pool organization to use for GPU mining +# ; Valid values: nanopool etherpool f2pool +# ; +# ; eth_minhashrate : Set to minimum hashrate over 10 minutes before restarting. Can accept M for Million and K for thousand. +# ; Example: 100K +# ; +# ; ethminer : Set to true for installation of ethminer +# ; UNFINISHED/UNTESTED +# ; +# ; nvidia : Set to true for NVidia support in ethminer. +# ; UNFINISHED/UNTESTED +# ; +# ; xmr_stak_cpu : Set to true for istallation +# ; UNFINISHED/UNTESTED +# ; +# [global] +# marker: '; {mark} MANAGED BY ANSIBLE | Miner Config' +# state: present +# create: yes +# backup: yes +# +#- name: General | Account Management | Provisioning Configuration | Miner | Load +# set_fact: +# miner: "{{ lookup('ini', 'enable file={{mnr_file}} default=false') }}" +# amdgpu: "{{ lookup('ini', 'amdgpu file={{mnr_file}} default=false') }}" +# nanominer: "{{ lookup('ini', 'nanominer file={{mnr_file}} default=false') }}" +# nanominer_cpu: "{{ lookup('ini', 'nanominer_cpu file={{mnr_file}} default=false') }}" +# nanominer_cpu_pool: "{{ lookup('ini', 'nanominer_cpu_pool file={{mnr_file}} default=false') }}" +# nanominer_gpu: "{{ lookup('ini', 'nanominer_gpu file={{mnr_file}} default=false') }}" +# nanominer_gpus: "{{ lookup('ini', 'nanominer_gpus file={{mnr_file}} default=false') }}" +# nanominer_gpu_pool: "{{ lookup('ini', 'nanominer_gpu_pool file={{mnr_file}} default=false') }}" +# eth_minhashrate: "{{ lookup('ini', 'eth_minhashrate file={{mnr_file}} default=false') }}" +# ethminer: "{{ lookup('ini', 'ethminer file={{mnr_file}} default=false') }}" +# nvidia: "{{ lookup('ini', 'nvidia file={{mnr_file}} default=false') }}" +# xmr_stak_cpu: "{{ lookup('ini', 'xmr_stak_cpu file={{mnr_file}} default=false') }}" +# +#- name: General | Account Management | Provisioning Configuration | Miner | List +# set_fact: +# provision_variables: "{{ provision_variables | combine(item) }}" +# loop: +# - { 'miner': "{{ miner }}" } +# - { 'amdgpu': "{{ amdgpu }}" } +# - { 'nanominer': "{{ nanominer }}" } +# - { 'nanominer_cpu': "{{ nanominer_cpu }}" } +# - { 'nanominer_cpu_pool': "{{ nanominer_cpu_pool }}" } +# - { 'nanominer_gpu': "{{ nanominer_gpu }}" } +# - { 'nanominer_gpus': "{{ nanominer_gpus }}" } +# - { 'nanominer_gpu_pool': "{{ nanominer_gpu_pool }}" } +# - { 'eth_minhashrate': "{{ eth_minhashrate }}" } +# - { 'ethminer': "{{ ethminer }}" } +# - { 'nvidia': "{{ nvidia }}" } +# - { 'xmr_stak_cpu': "{{ xmr_stak_cpu }}" } ## Server ## diff --git a/tasks/general/finish.yml b/tasks/general/finish.yml index eba1c93..6b24074 100644 --- a/tasks/general/finish.yml +++ b/tasks/general/finish.yml @@ -2,11 +2,6 @@ # Tasks related to finishing ansible-pull # EG: End timer, start conflicting jobs, etc -- name: General | Finish | Ansible Pull Report | Debug - debug: - var: leet_drive_details - when: leet_drive_details is defined - - name: General | Finish | Ansible Pull Report | Finish File shell: "echo 'FINISH' >> {{ ansible_pull_report }}" when: leet_drive_details.stat.exists diff --git a/tasks/general/software/packages.yml b/tasks/general/software/packages.yml index 02f5f24..3b17d74 100644 --- a/tasks/general/software/packages.yml +++ b/tasks/general/software/packages.yml @@ -48,7 +48,7 @@ - "{{ locate }}" - zsh - "{{ opensshd }}" - - tar + - "{{ tar }}" state: present - name: General | Software | Services | Install CROND (Looking at you, Fedora) diff --git a/tasks/server/software/git.yml b/tasks/server/software/git.yml index 85e49ae..98cf75b 100644 --- a/tasks/server/software/git.yml +++ b/tasks/server/software/git.yml @@ -4,7 +4,7 @@ ## Variables ## -- name: Server | Software | Git | Check Config Variables +- name: Server | Software | HTTPS Git Server | Check Config Variables debug: var: "{{ item }}" loop: @@ -13,14 +13,14 @@ - git_url - git_sep -- name: Server | Software | Git | Split Config Variables To Array +- name: Server | Software | HTTPS Git Server | Split Config Variables To Array set_fact: git_names: "{{ git_name.split(git_sep) }}" git_branches: "{{ git_branch.split(git_sep) }}" git_urls: "{{ git_url.split(git_sep) }}" git_projects: [] -- name: Server | Software | Git | Check Arrays +- name: Server | Software | HTTPS Git Server | Check Arrays debug: var: "{{ item }}" loop: @@ -28,29 +28,34 @@ - git_branches - git_urls -- name: Server | Software | Git | Build Dictionary +- name: Server | Software | HTTPS Git Server | Build Dictionary set_fact: git_projects: "{{ git_projects + [{ 'name': git_names[item], 'branch': git_branches[item], 'url': git_urls[item] }] }}" loop: "{{ range(0, git_names|length) | list }}" -- name: Server | Software | Git | Display Dictionary +- name: Server | Software | HTTPS Git Server | Display Dictionary debug: var: git_projects -- name: Server | Software | Git | Variables 1 +- name: Server | Software | HTTPS Git Server | Variables 1 set_fact: git_web_root: /var/www/html/git git_config_file: /etc/nginx/conf.d/git.conf git_nginx_user: www-data + git_ssl_dir: /usr/local/etc/ssl/private + git_ssl_cert_name: cert.pem + git_ssl_key_name: key.pem -- name: Server | Software | Git | Variables 2 +- name: Server | Software | HTTPS Git Server | Variables 2 set_fact: git_cron_commands: "git pull --rebase && cd {{ git_web_root }}/ && chown -R {{ git_nginx_user }} . && chmod -R 775 ." + git_ssl_cert: "{{ git_ssl_dir }}/{{ git_ssl_cert_name }}" + git_ssl_key: "{{ git_ssl_dir }}/{{ git_ssl_key_name }}" ## Pre-reqs ## -- name: Server | Software | Git | Install +- name: Server | Software | HTTPS Git Server | Install package: name: - nginx @@ -60,26 +65,32 @@ - unzip state: present when: ansible_pkg_mgr == "apt" + +- name: Server | Software | HTTPS Git Server | SSL Certificate + shell: "{{ item }}" + loop: + - mkdir -p {{ git_ssl_dir }} + - openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout {{ git_ssl_key }} -out {{ git_ssl_cert }} -subj "/C=XX/ST=STATELESS/L=HOMELAB/O={{ domain }}/OU=Git Server/CN={{ domain }}" ## Repositories ## -- name: Server | Software | Git | Delete +- name: Server | Software | HTTPS Git Server | Delete file: path: "{{ git_web_root }}" state: absent -- name: Server | Software | Git | Download +- name: Server | Software | HTTPS Git Server | Download git: repo: "{{ item.url }}" dest: "{{ git_web_root }}/{{ item.name }}.git" version: "{{ item.branch }}" clone: yes force: yes - #ignore_errors: yes + ignore_errors: yes loop: "{{ git_projects }}" -- name: Server | Software | Git | Permissions +- name: Server | Software | HTTPS Git Server | Permissions file: path: "{{ git_web_root }}/{{ item.name }}.git" state: directory @@ -92,7 +103,7 @@ ## NGINX ## -- name: Server | Software | Git | Index +- name: Server | Software | HTTPS Git Server | Index blockinfile: path: "{{ git_web_root }}/index.html" block: | @@ -106,12 +117,16 @@ marker: "" loop: "{{ git_projects }}" -- name: Server | Software | Git | Config +- name: Server | Software | HTTPS Git Server | Config blockinfile: path: "{{ git_config_file }}" block: | server { - listen 80; + listen 443; + server_name {{ ansible_hostname }}.{{ domain }}; + + ssl_certificate {{ git_ssl_cert }}; + ssl_certificate_key {{ git_ssl_key }}; root {{ git_web_root }}; @@ -119,8 +134,6 @@ index index.html; #autoindex on; - server_name {{ ansible_hostname }}.{{ domain }}; - location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. @@ -146,7 +159,7 @@ backup: yes marker: "# {mark} Managed By Ansible Git Server Playbook -->" -- name: Server | Software | Git | Service +- name: Server | Software | HTTPS Git Server | Service service: name: nginx pattern: nginx @@ -156,14 +169,14 @@ ## Cron ## -- name: Server | Software | Git | Cron | Hourly +- name: Server | Software | HTTPS Git Server | Cron | Hourly ansible.builtin.cron: name: "{{ item.name }} hourly" special_time: hourly job: "cd {{ git_web_root }}/{{ item.name }}.git && {{ git_cron_commands }}" loop: "{{ git_projects }}" -- name: Server | Software | Git | Cron | Reboot +- name: Server | Software | HTTPS Git Server | Cron | Reboot ansible.builtin.cron: name: "{{ item.name }} reboot" special_time: reboot diff --git a/tasks/workstation/freebsd/software/gnome.yml b/tasks/workstation/freebsd/software/gnome.yml new file mode 100644 index 0000000..97d7a31 --- /dev/null +++ b/tasks/workstation/freebsd/software/gnome.yml @@ -0,0 +1,43 @@ +--- +# Provide FreeBSD with a DE. + +- name: Workstation | FreeBSD | Software | GUI | Install UI Components + package: + name: + - xorg + - gnome3-lite + - "{{ firefox_esr }}" + - "{{ evolution }}" + - vscode + - gimp + - telegram-desktop + - lightdm + - lightdm-gtk-greeter + state: present + +- name: Workstation | FreeBSD | Software | GUI | Create rc.conf Entries + blockinfile: + path: "{{ rc_conf }}" + marker: "# {mark} MANAGED BY ANSIBLE | GNOME Components" + block: | + dbus_enable="YES" + hald_enable="YES" + gnome_enable="YES" + #gdm_enable="YES" + lightdm_enable="YES" + create: yes + backup: yes + +- name: Workstation | FreeBSD | Software | GUI | Create fstab Entries + blockinfile: + path: /etc/fstab + block: | + proc /proc procfs rw 0 0 + marker: '# {mark} MANAGED BY ANSIBLE | GNOME Components' + state: present + backup: yes + +- name: Workstation | FreeBSD | Software | GUI | Mount All + shell: mount -a + args: + warn: false diff --git a/tasks/workstation/freebsd/software/gpu.yml b/tasks/workstation/freebsd/software/gpu.yml new file mode 100644 index 0000000..2ce4022 --- /dev/null +++ b/tasks/workstation/freebsd/software/gpu.yml @@ -0,0 +1,17 @@ +--- +# Provide FreeBSD with GPU driver. + +- name: Workstation | FreeBSD | Software | GPU Driver | Install + package: + name: + - drm-kmod + state: present + +- name: Workstation | FreeBSD | Software | GPU Driver | Create rc.conf Entries + blockinfile: + path: "{{ rc_conf }}" + marker: "# {mark} MANAGED BY ANSIBLE | GPU Components" + block: | + kld_list="{{ freebsd_gpu }}" + create: yes + backup: yes diff --git a/tasks/workstation/freebsd/software/gui.yml b/tasks/workstation/freebsd/software/gui.yml deleted file mode 100644 index 97bb5dd..0000000 --- a/tasks/workstation/freebsd/software/gui.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -# Provide FreeBSD with a DE. - -- name: Workstation | FreeBSD | GUI | Install UI Components - package: - name: - - xorg - - gnome3-lite - - "{{ firefox_esr }}" - - "{{ evolution }}" - - vscode - - gimp - - telegram-desktop - state: present - -- name: Workstation | FreeBSD | GUI | Uninstall Bloat - package: - name: - - "{{ firefox }}" - - "{{ thunderbird }}" - state: absent - -- name: Workstation | FreeBSD | GUI | Create rc.conf Entries - blockinfile: - path: "{{ rc_conf }}" - marker: "# {mark} MANAGED BY ANSIBLE | GUI Components" - block: | - dbus_enable="YES" - hald_enable="YES" - gnome_enable="YES" - gdm_enable="YES" - create: yes - backup: yes - -- name: Workstation | FreeBSD | GUI | Create proc fstab Entry - lineinfile: - path: /etc/fstab - regexp: '^proc' - line: proc /proc procfs rw 0 0 - state: absent - backup: yes - -- name: Workstation | FreeBSD | GUI | Create proc fstab Comment - lineinfile: - path: /etc/fstab - regexp: '^# MANAGED BY ANSIBLE | Leet Share' - line: '# MANAGED BY ANSIBLE | Leet Share' - state: absent - insertbefore: '^proc' - -- name: Workstation | FreeBSD | GUI | Create fstab Entries - blockinfile: - path: /etc/fstab - block: | - proc /proc procfs rw 0 0 - marker: '# {mark} MANAGED BY ANSIBLE | GUI Components' - state: present - backup: yes - -- name: Workstation | FreeBSD | GUI | Mount All - shell: mount -a - args: - warn: false diff --git a/tasks/workstation/freebsd/software/lbry.yml b/tasks/workstation/freebsd/software/lbry.yml new file mode 100644 index 0000000..0f8741e --- /dev/null +++ b/tasks/workstation/freebsd/software/lbry.yml @@ -0,0 +1,4 @@ +--- +# Install LBRY desktop client. + +# TODO: https://github.com/lbryio/lbry-desktop#install \ No newline at end of file diff --git a/tasks/workstation/freebsd/software/packages.yml b/tasks/workstation/freebsd/software/packages.yml new file mode 100644 index 0000000..3ea36ed --- /dev/null +++ b/tasks/workstation/freebsd/software/packages.yml @@ -0,0 +1,74 @@ +--- +# Packages for FreeBSD workstation. + +# General # + +- name: Workstation | FreeBSD | Software | Packages | General | Install + package: + name: + - "{{ firefox_esr }}" + - "{{ evolution }}" + - telegram-desktop + - libreoffice + state: present + +- name: Workstation | FreeBSD | Software | Packages | General | Uninstall Bloat + package: + name: + - "{{ firefox }}" + - "{{ thunderbird }}" + state: absent + +# Coding # + +- name: Workstation | FreeBSD | Software | Packages | Coding | Install + package: + name: + - vscode + state: present + when: coding == true + +- name: Workstation | FreeBSD | Software | Packages | Coding | Install + package: + name: + - vscode + state: absent + when: not coding == true + +# Media Editors # + +- name: Workstation | FreeBSD | Software | Packages | Editing | Install + package: + name: + - gimp + - shotcut + - obs-studio + state: present + when: editing == true + +- name: Workstation | FreeBSD | Software | Packages | Editing | Install + package: + name: + - gimp + - shotcut + - obs-studio + state: absent + when: not editing == true + +# Gaming # + +- name: Workstation | FreeBSD | Software | Packages | Gaming | Install + package: + name: + - 0ad + - supertuxkart + state: present + when: gaming == true + +- name: Workstation | FreeBSD | Software | Packages | Gaming | Install + package: + name: + - 0ad + - supertuxkart + state: absent + when: not gaming == true diff --git a/tasks/workstation/settings/gnome.yml b/tasks/workstation/shared/settings/gnome.yml similarity index 51% rename from tasks/workstation/settings/gnome.yml rename to tasks/workstation/shared/settings/gnome.yml index 8102dfd..76c9ae9 100644 --- a/tasks/workstation/settings/gnome.yml +++ b/tasks/workstation/shared/settings/gnome.yml @@ -40,126 +40,130 @@ ## Dash to Dock Extension ## # Note: Validate DtD by checking /org/gnome/shell/enabled-extensions for dash-to-dock@micxgx.gmail.com -- name: Workstation | Account Management | GNOME | Dash To Dock | Check - shell: "cd ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/" - become_user: "{{ user }}" - register: dash_to_dock_exists +- name: Workstation | Account Management | GNOME | Dash To Dock + block: + + - name: Workstation | Account Management | GNOME | Dash To Dock | Check + shell: "cd ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/" + become_user: "{{ user }}" + register: dash_to_dock_exists + + # Install # + # https://micheleg.github.io/dash-to-dock/download.html + + - name: Workstation | Account Management | GNOME | Dash To Dock | Install | Clone Repo + git: + repo: https://github.com/micheleg/dash-to-dock.git + dest: "~/TRASH/dash-to-dock/" + clone: yes + force: no + version: master + become_user: "{{ user }}" + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Install | Dependencies + package: + name: + - "{{ make }}" + - "{{ msgfmt }}" + - "{{ sassc }}" + state: present + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Install | Make + shell: "cd ~/TRASH/dash-to-dock/; {{ make }}; {{ make }} install" + become_user: "{{ user }}" + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Read Enabled Extension Array + dconf: + key: /org/gnome/shell/enabled-extensions + state: read + become_user: "{{ user }}" + register: gnome_enabled_extensions + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | dconf Return Object + debug: + var: gnome_enabled_extensions + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + # https://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_filters.html#filters-for-formatting-data + + - name: Workstation | Account Management | GNOME | Dash To Dock | Variables 1 + set_fact: + gnome_enabled_extensions: "{{ gnome_enabled_extensions.value | replace('@as ', '') }}" + dash_to_dock_ext_comma: "" + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | After replace() + debug: + var: gnome_enabled_extensions + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Variables 2 + set_fact: + dash_to_dock_ext_comma: ", " + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions not in ("[]", [], "None") + + - name: Workstation | Account Management | GNOME | Dash To Dock | Variables 3 + set_fact: + dash_to_dock_ext_name: "{{ dash_to_dock_ext_comma }}'dash-to-dock@micxgx.gmail.com']" + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Variables 4 + set_fact: + gnome_enabled_extensions: "[]" + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions == "None" + + - name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append With + debug: + var: dash_to_dock_ext_name + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append To + debug: + var: gnome_enabled_extensions + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Print Combined Value + debug: + msg: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}" + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + - name: Workstation | Account Management | GNOME | Dash To Dock | Enable + dconf: + key: /org/gnome/shell/enabled-extensions + value: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}" + state: present + become_user: "{{ user }}" + when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed + + # Settings # + + - name: Workstation | Account Management | GNOME | Dash To Dock | Dock Position + dconf: + key: /org/gnome/shell/extensions/dash-to-dock/dock-position + value: "'LEFT'" + state: present + become_user: "{{ user }}" + + - name: Workstation | Account Management | GNOME | Dash To Dock | Dock Fixed + dconf: + key: /org/gnome/shell/extensions/dash-to-dock/dock-fixed + value: "true" + state: present + become_user: "{{ user }}" + + - name: Workstation | Account Management | GNOME | Dash To Dock | Icon Size + dconf: + key: /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size + value: "32" + state: present + become_user: "{{ user }}" + ignore_errors: yes -# Install # -# https://micheleg.github.io/dash-to-dock/download.html - -- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Clone Repo - git: - repo: https://github.com/micheleg/dash-to-dock.git - dest: "~/TRASH/dash-to-dock/" - clone: yes - force: no - version: master - become_user: "{{ user }}" - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Dependencies - package: - name: - - "{{ make }}" - - "{{ msgfmt }}" - - "{{ sassc }}" - state: present - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Make - shell: "cd ~/TRASH/dash-to-dock/; {{ make }}; {{ make }} install" - become_user: "{{ user }}" - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Read Enabled Extension Array - dconf: - key: /org/gnome/shell/enabled-extensions - state: read - become_user: "{{ user }}" - register: gnome_enabled_extensions - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | dconf Return Object - debug: - var: gnome_enabled_extensions - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -# https://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_filters.html#filters-for-formatting-data - -- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 1 - set_fact: - gnome_enabled_extensions: "{{ gnome_enabled_extensions.value | replace('@as ', '') }}" - dash_to_dock_ext_comma: "" - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | After replace() - debug: - var: gnome_enabled_extensions - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 2 - set_fact: - dash_to_dock_ext_comma: ", " - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions not in ("[]", [], "None") - -- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 3 - set_fact: - dash_to_dock_ext_name: "{{ dash_to_dock_ext_comma }}'dash-to-dock@micxgx.gmail.com']" - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 4 - set_fact: - gnome_enabled_extensions: "[]" - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions == "None" - -- name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append With - debug: - var: dash_to_dock_ext_name - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append To - debug: - var: gnome_enabled_extensions - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Print Combined Value - debug: - msg: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}" - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -- name: Workstation | Account Management | GNOME | Dash To Dock | Enable - dconf: - key: /org/gnome/shell/enabled-extensions - value: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}" - state: present - become_user: "{{ user }}" - when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed - -# Settings # - -- name: Workstation | Account Management | GNOME | Dash To Dock | Dock Position - dconf: - key: /org/gnome/shell/extensions/dash-to-dock/dock-position - value: "'LEFT'" - state: present - become_user: "{{ user }}" - -- name: Workstation | Account Management | GNOME | Dash To Dock | Dock Fixed - dconf: - key: /org/gnome/shell/extensions/dash-to-dock/dock-fixed - value: "true" - state: present - become_user: "{{ user }}" - -- name: Workstation | Account Management | GNOME | Dash To Dock | Icon Size - dconf: - key: /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size - value: "32" - state: present - become_user: "{{ user }}" - - name: Workstation | Account Management | GNOME | Favorites (Linux) dconf: key: /org/gnome/shell/favorite-apps diff --git a/tasks/workstation/settings/nfs.yml b/tasks/workstation/shared/settings/nfs.yml similarity index 100% rename from tasks/workstation/settings/nfs.yml rename to tasks/workstation/shared/settings/nfs.yml diff --git a/tasks/workstation/settings/rdp.yml b/tasks/workstation/shared/settings/rdp.yml similarity index 100% rename from tasks/workstation/settings/rdp.yml rename to tasks/workstation/shared/settings/rdp.yml diff --git a/tasks/workstation/settings/services.yml b/tasks/workstation/shared/settings/services.yml similarity index 100% rename from tasks/workstation/settings/services.yml rename to tasks/workstation/shared/settings/services.yml diff --git a/tasks/workstation/settings/vnc.yml b/tasks/workstation/shared/settings/vnc.yml similarity index 100% rename from tasks/workstation/settings/vnc.yml rename to tasks/workstation/shared/settings/vnc.yml diff --git a/tasks/workstation/linux/software/dwm.yml b/tasks/workstation/shared/software/dwm.yml similarity index 84% rename from tasks/workstation/linux/software/dwm.yml rename to tasks/workstation/shared/software/dwm.yml index 238fbb6..11aeff6 100644 --- a/tasks/workstation/linux/software/dwm.yml +++ b/tasks/workstation/shared/software/dwm.yml @@ -3,6 +3,11 @@ # https://dwm.suckless.org/ # https://sites.google.com/site/lazyboxx/-articles/dwm-a-newbie-s-guide#TOC-Status-Bar +#TODO: Move this to tasks/shared/ pasth rather than tasks/linux/. +#TODO: Generate files based on blockinfile. +#TODO: Fix config.mk for FreeBSD automatically (use /usr/local/ for libs not /usr/X11RC/) +#TODO: scm.sh to use bash variable so that FreeBSD correctly hits /usr/local/bin/bash. + ## Pre-reqs ## - name: Workstation | Linux | Software | DWM | Pre-Reqs