General Release (#17)

* Add a few aliases for initializing projects.

* Begin creating executables in bin for flatpaks. Create an array to reduce future changes.

* Add quotes.

* Create files as user and set executable permissions.

* Split exec dir from array section.

* Increase interval for Telegraf but keep the flush at 30s.

* Add alias goodbye/bye, modify alias names for initializing program and video projects.

* Add newline.

* Add content to file to remove warning.

* Use arrays for Flatpak sections. Create executable files for them.

* Move sudoer files into shared folder.

* First stab at automating a GitLab install.

* First stab at automating DWM install.

* Fix 'usr' typo.

* Lowercase dwm.

* Fix config play. Install font-awesome.

* Add placeholder.

* Add dmenu and st.

* Fix typo. Hopefully also fixes ~/bin executables.

* Add Signal. Remove Discord.

* Remove extra line.

* Add newline.

* Move dbus-launch to correct app.

* Fix clock minutes.

* Add server for GitLab.

* Change check, package was not registering anything.

* Change success to failed.

* Change to http. Will use reverse proxy.

* Remove useless sudo. Go ahead and allow postfix to be installed.

* Fix debug option "var".

* Only give the out lines. Remove exit, doesn't stop the job.

* Add a few games and test them on dell-laptop.

* Ignore Lutris errors, Rolling Rhino doesn't like the PPA. ;)

* Add goodbye for updating then quitting.

* Add airbook to gaming.

* Add dnf.

* Fix missing underscores.

* Install cronie on Fedora.

* Beginning to add Fedora.

* Add Fedora values.

* Make font-awesome optional since it may need installed manually on some systems.

* Fix typo in ignore_errors.

* Allow DWM to fail, won't work for all workstations. Fedora doesn't have X11 headers.

* Most dists are using python3-psutil for the psutil package name. Make it the default.

* Fix firefox_esr variable.

* More Fedora support.

* Move installation of cron to more applicable task list.

* Fic nfs-utils typo.

* The font is honestly pretty important. ;)

* Add Librewolf for testing vs Brave.

* For some reason the other link didn't work for Fedora, add the one from flatpak's instructions.

* Fedora status update.

* Add games to Inspiron.

* LibreWolf is amazing. Use it as default if available.

* Use English rather than code for `and` and `or`.

* Always have LibreWolf pinned if it's available. Brave should still be the main browser for URL-clicking compatibility.

* Fix comma.

* Add entry for testing Fedora Gitlab server.

* Attempt to automate more of the Gitlab setup, especially the part of being behind a reverse proxy. Also add Fedora family support.

* Specify the package managers for Gitlab.

* Add missing bracket.

* Add another missing bracket.

* Fix gitlab's when clause.

* Another fix for the gitlab when.

* Change original gitlab install to be Community Edition.

* Fix mgr typo. Create config file if it doesn't exist.

* Remove duplicate `when` on Lutris uninstall.

* Gitlab script gets a packagecloud.io error for Fedora. Looks like only CentOS and its derivatives are supported.

* Update status of Fedora.
This commit is contained in:
Hyperling 2021-11-07 12:40:31 -06:00 committed by GitHub
parent d3357cb2d9
commit 1f5fdb7eb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 607 additions and 89 deletions

View File

@ -15,12 +15,17 @@ This setup is specific to the maintainer's devices and needs. You're welcome to
#### Mint #### Mint
100%, but not really used, just tested once for fun. 100%, but not really used, just tested once for fun.
#### Parrot Security OS (MATE) #### Parrot Security OS (MATE)
100% for a while, but OS did not serve maintainer's needs and 404 errors were terrible. Ubuntu Rolling Rhino filled the gap. 100% for a while, but OS did not serve maintainer's needs and 404 errors were terrible while updating. Ubuntu Rolling Rhino filled the gap.
### Arch Family ### Arch Family
#### Manjaro #### Manjaro
100% at some point. 100% at some point.
### Fedora Family
#### Fedora 35
Workstation: 100%
Server: 100%
## Currently Supported Unix Systems ## Currently Supported Unix Systems
### FreeBSD 12, 13 ### FreeBSD 12, 13
100%, although GUI is not working completely on 13 yet (dash-to-dock doesn't compile). 100%, although GUI is not working completely on 13 yet (dash-to-dock doesn't compile).

View File

@ -30,6 +30,13 @@
ansible_python_interpreter: "/usr/local/bin/python3.8" ansible_python_interpreter: "/usr/local/bin/python3.8"
when: ansible_system == "FreeBSD" when: ansible_system == "FreeBSD"
- name: General | Facts | Package | dnf
set_fact:
sshfs: fuse-sshfs
locate: mlocate
opensshd: openssh
when: ansible_pkg_mgr == "dnf"
- name: General | Facts | Package | Update Commands | Helpers - name: General | Facts | Package | Update Commands | Helpers
set_fact: set_fact:
@ -78,6 +85,13 @@
done && done &&
when: ansible_distribution == "Parrot OS" when: ansible_distribution == "Parrot OS"
- name: General | Facts | Package | Update Commands | dnf
set_fact:
update_package_manager: |
echo "*** DNF ***" &&
sudo dnf upgrade {{ update_accept_var }} &&
when: ansible_pkg_mgr in ("dnf")
- name: General | Facts | Package | Update Commands | flatpak | check - name: General | Facts | Package | Update Commands | flatpak | check
shell: which flatpak shell: which flatpak

View File

@ -1,27 +1,33 @@
--- ---
# Define file, folder, and other facts per OS. # Define file, folder, and other facts per OS.
- name: General | Facts | System | Global
set_fact:
leet_ssh: 'ling@leet'
leet_drive: /mnt/leet
lynis_install_dir: /usr/local/lynis
dwm_install_dir: /usr/local/src/dwm
st_install_dir: /usr/local/src/st
global_bin: /usr/local/bin
x_desktops: /usr/share/xsessions
- name: General | Facts | System | Linux - name: General | Facts | System | Linux
set_fact: set_fact:
rc_conf: /dev/null rc_conf: /dev/null
lynis_install_dir: /usr/local/lynis
sudoers_install_dir: /etc/sudoers.d/ sudoers_install_dir: /etc/sudoers.d/
shutdown_command: sudo shutdown -h now
when: ansible_system == "Linux" when: ansible_system == "Linux"
- name: General | Facts | System | FreeBSD - name: General | Facts | System | FreeBSD
set_fact: set_fact:
rc_conf: /etc/rc.conf rc_conf: /etc/rc.conf
lynis_install_dir: /usr/local/lynis
sudoers_install_dir: /usr/local/etc/sudoers.d/ sudoers_install_dir: /usr/local/etc/sudoers.d/
shutdown_command: sudo shutdown -p now
when: ansible_system == "FreeBSD" when: ansible_system == "FreeBSD"
- name: General | Facts | System | 1337 Drive
set_fact:
leet_ssh: 'ling@leet'
leet_drive: /mnt/leet
- name: General | Facts | System | 1337 Drive Mounted? - name: General | Facts | System | 1337 Drive Mounted?
stat: stat:
path: "{{ leet_drive }}/Temp/ansible" path: "{{ leet_drive }}/Temp/ansible"

View File

@ -12,21 +12,25 @@
- name: Workstation | Facts | Package | Consistent - name: Workstation | Facts | Package | Consistent
set_fact: set_fact:
firefox: firefox firefox: firefox
firefox_esr: firefox-esr
thunderbird: thunderbird thunderbird: thunderbird
evolution: evolution evolution: evolution
psutil: python3-psutil
gnome_tweaks: gnome-tweaks gnome_tweaks: gnome-tweaks
dconf_editor: dconf-editor dconf_editor: dconf-editor
appimagelauncher: htop #placeholder appimagelauncher: htop #placeholder
nfs: nfs-common nfs: nfs-common
msgfmt: gettext msgfmt: gettext
make: make make: make
font_awesome: fonts-font-awesome
dmenu: dmenu
sassc: sassc
- name: Workstation | Facts | Package | Pop_OS! - name: Workstation | Facts | Package | Pop_OS!
set_fact: set_fact:
flatpak_distro: true flatpak_distro: true
firefox_esr: firefox firefox_esr: firefox
psutil: python3-psutil
when: ansible_distribution == "Pop!_OS" when: ansible_distribution == "Pop!_OS"
@ -34,15 +38,14 @@
set_fact: set_fact:
flatpak_distro: true flatpak_distro: true
firefox_esr: firefox firefox_esr: firefox
psutil: python3-psutil dmenu: suckless-tools
when: ansible_distribution == "Ubuntu" when: ansible_distribution == "Ubuntu"
- name: Workstation | Facts | Package | Debian - name: Workstation | Facts | Package | Debian
set_fact: set_fact:
flatpak_distro: true flatpak_distro: true
firefox_esr: firefox-esr dmenu: suckless-tools
psutil: python3-psutil
when: ansible_distribution == "Debian" when: ansible_distribution == "Debian"
@ -50,7 +53,6 @@
set_fact: set_fact:
flatpak_distro: true flatpak_distro: true
firefox_esr: firefox firefox_esr: firefox
psutil: python3-psutil
when: ansible_distribution == "Linux Mint" when: ansible_distribution == "Linux Mint"
@ -58,7 +60,6 @@
set_fact: set_fact:
flatpak_distro: true flatpak_distro: true
firefox_esr: firefox-esr firefox_esr: firefox-esr
psutil: python3-psutil
when: ansible_distribution == "Parrot OS" when: ansible_distribution == "Parrot OS"
@ -74,9 +75,17 @@
- name: Workstation | Facts | Package | FreeBSD - name: Workstation | Facts | Package | FreeBSD
set_fact: set_fact:
flatpak_distro: false flatpak_distro: false
firefox_esr: firefox-esr
psutil: py38-psutil psutil: py38-psutil
ansible_python_interpreter: "/usr/local/bin/python3.8" ansible_python_interpreter: "/usr/local/bin/python3.8"
make: gmake # make comes with OS and cannot be installed with pkg. Try using gmake for better luck. make: gmake # make comes with OS and cannot be installed with pkg. Try using gmake for better luck.
font_awesome: font-awesome
when: ansible_system == "FreeBSD" when: ansible_system == "FreeBSD"
- name: Workstation | Facts | Package | Fedora
set_fact:
flatpak_distro: true
firefox_esr: firefox
font_awesome: python3-XStatic-Font-Awesome
nfs: nfs-utils
when: ansible_distribution == "Fedora"

118
files/dwm/config.h Normal file
View File

@ -0,0 +1,118 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 3; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "iosevka:size:9", "monospace:size=10", "fontawesome:size=9" };
//static const char dmenufont[] = "monospace:size=9";
static const char dmenufont[] = "iosevka:size=8";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#400080";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
};
/* tagging */
static const char *tags[] = { "1:", "2:", "3:", "4:", "5:", "6:", "7:", "8:", "9:" };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
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 };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
// Mine
{ MODKEY, XK_q, killclient, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};

5
files/dwm/dwm.desktop Normal file
View File

@ -0,0 +1,5 @@
[Desktop Entry]
Name=dwm
Comment=1337 Tiling Window Manager
Exec=/usr/local/bin/dwm.sh
Type=Application

36
files/dwm/dwm.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/bash
# 2021-10-30 Hyperling
# Basically .xinitrc, but not placed there to avoid GDM/GNOME problems.
## System Libs ##
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /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`
## Status Bars ##
# slstatus, from Suckless #
#exec slstatus &
# Custom #
while true; do
xsetroot -name "`date +"%Y-%m-%d %H:%M:%S"`"
done &
## Start ##
exec dwm

14
hosts
View File

@ -24,15 +24,15 @@ x570 branch=dev
; vnc : Define for installation of VNC protocol ; vnc : Define for installation of VNC protocol
; NOT IMPLEMENTED YET ; NOT IMPLEMENTED YET
; ;
dell-laptop coding=true editing=true dell-laptop coding=true editing=true gaming=true
dell-inspiron coding=true dell-inspiron coding=true gaming=true
usb-workstation coding=true usb-workstation coding=true
lbry-server-1 lbry-server-1
lbry-server-2 lbry-server-2
lbry-server-3 lbry-server-3
aspire coding=true editing=true gaming=true aspire coding=true editing=true gaming=true
freeboy rdp=true freeboy rdp=true
airbook coding=true editing=true airbook coding=true editing=true gaming=true
[mobile] [mobile]
pinephone pinephone
@ -93,9 +93,9 @@ x570 amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu
; hugo : Set to anything to install HUGO static website generator. ; hugo : Set to anything to install HUGO static website generator.
; Example: true ; Example: true
; ;
; gitlab : Set to anything to install Gitlab project management tool. ; gitlab : ee - Installs Enterprise Edition Free Tier. Basically CE with an easier upgrade path for Paid Features
; Example: true ; ce - Installs Community Edition. Excludes paid features if you'll never use them. Sepposedly difficult to move to EE.
; NOT IMPLEMENTED YET ; Example: ce
; ;
onlyoffice domain=hyperling.com onlyoffice=true onlyoffice domain=hyperling.com onlyoffice=true
grafana domain=hyperling.com grafana=true influxdb1=true grafana domain=hyperling.com grafana=true influxdb1=true
@ -108,3 +108,5 @@ reverse-proxy certbot=true
nextcloud nextcloud
wordpress certbot=true wordpress certbot=true
usb-server usb-server
gitlab gitlab=ce domain=hyperling.com
gitlab2 gitlab=ce domain=hyperling.com

View File

@ -57,6 +57,10 @@
- include: tasks/workstation/linux/software/gnome.yml - include: tasks/workstation/linux/software/gnome.yml
when: ansible_system == "Linux" when: ansible_system == "Linux"
- include: tasks/workstation/linux/software/dwm.yml
when: ansible_system in ("Linux", "FreeBSD")
ignore_errors: yes
# Software Tasks # # Software Tasks #
- include: tasks/workstation/linux/software/flatpaks.yml - include: tasks/workstation/linux/software/flatpaks.yml
when: ansible_system == "Linux" and flatpak_distro when: ansible_system == "Linux" and flatpak_distro
@ -161,7 +165,7 @@
when: hugo is defined when: hugo is defined
- include: tasks/server/software/gitlab.yml - include: tasks/server/software/gitlab.yml
when: gitlab is defined when: gitlab is defined and ansible_pkg_mgr in ("apt", "dnf") and ansible_distribution not in ("Fedora")

View File

@ -3,7 +3,7 @@
- name: General | Account Management | Sudo | Copy Ansible - name: General | Account Management | Sudo | Copy Ansible
copy: copy:
src: sudoers_ansible src: sudo/sudoers_ansible
dest: "{{ sudoers_install_dir }}" dest: "{{ sudoers_install_dir }}"
owner: root owner: root
group: "{{ root_group }}" group: "{{ root_group }}"
@ -11,7 +11,7 @@
- name: General | Account Management | Sudo | Copy Sudo Group - name: General | Account Management | Sudo | Copy Sudo Group
copy: copy:
src: sudoers_sudo src: sudo/sudoers_sudo
dest: "{{ sudoers_install_dir }}" dest: "{{ sudoers_install_dir }}"
owner: root owner: root
group: "{{ root_group }}" group: "{{ root_group }}"

View File

@ -147,7 +147,12 @@
editor: export EDITOR='vi' editor: export EDITOR='vi'
init_aliases: | init_aliases: |
alias init-video='mkdir -v raw; mkdir -v exports; cp ~/Templates/*video* ./' alias init-video='mkdir -v raw; mkdir -v exports; cp ~/Templates/*video* ./'
alias init-prog='echo -e "#!/bin/bash\n# `date +%Y-%m-%d` by Hyperling\n# REASON\n\nexit 0\n"' alias init-vid=init-video
alias init-program='echo -e "#!/bin/bash\n# `date +%Y-%m-%d` by Hyperling\n# REASON\n\nexit 0\n"'
alias init-prog=init-program
bye: |
alias bye="{{ shutdown_command }}"
alias goodbye="update -y && bye"
- name: General | Account Management | Users | Files | Common Variable - name: General | Account Management | Users | Files | Common Variable
set_fact: set_fact:
@ -165,6 +170,7 @@
{{ sync }} {{ sync }}
{{ editor }} {{ editor }}
{{ init_aliases }} {{ init_aliases }}
{{ bye }}
- name: General | Account Management | Users | Files | .bashrc - name: General | Account Management | Users | Files | .bashrc
blockinfile: blockinfile:

View File

@ -50,6 +50,12 @@
- "{{ opensshd }}" - "{{ opensshd }}"
state: present state: present
- name: General | Software | Services | Install CROND (Looking at you, Fedora)
package:
name: cronie
state: present
when: ansible_pkg_mgr == "dnf"
- name: General | Software | Packages | Update Software (Disabled) - name: General | Software | Packages | Update Software (Disabled)
package: package:
name: name:

View File

@ -1,3 +1,102 @@
--- ---
# Install a Gitlab server. # Install a Gitlab server for hosting software projects.
# https://about.gitlab.com/install/#ubuntu
## Checks ##
- name: "Server | Software | GitLab | Checks | Host Variable: {{ gitlab }}"
shell: echo "ERROR! Variable has an invalid value!" && exit 1
when: gitlab not in ("ee", "ce")
- name: Server | Software | GitLab | Checks | Play Variables
set_fact:
gitlab_bundle: "gitlab-{{ gitlab }}"
gitlab_config: /etc/gitlab/gitlab.rb
gitlab_url_prefix: "https://git"
# Ensure other version is not installed.
- name: Server | Software | GitLab | Checks | Remove EE
package:
name: gitlab-ee
state: absent
when: gitlab == "ce"
- name: Server | Software | GitLab | Checks | Remove CE
package:
name: gitlab-ce
state: absent
when: gitlab == "ee"
## Install ##
# https://about.gitlab.com/install/?version=ce#ubuntu
# https://about.gitlab.com/install/?version=ce#centos-8 (Fedora)
- name: Server | Software | GitLab | Install | Check
shell: which gitlab-ctl
ignore_errors: yes
register: gitlab_installed
- name: Server | Software | GitLab | Install | Pre-Reqs
package:
update_cache: yes
name:
- curl
- openssh-server
- ca-certificates
- tzdata
- perl
- postfix
state: present
when: gitlab_installed.failed
- name: Server | Software | GitLab | Install | Add Repo (apt)
shell: curl https://packages.gitlab.com/install/repositories/gitlab/{{ gitlab_bundle }}/script.deb.sh | bash
when: gitlab_installed.failed and ansible_pkg_mgr == "apt"
- name: Server | Software | GitLab | Install | Add Repo (dnf)
shell: curl https://packages.gitlab.com/install/repositories/gitlab/{{ gitlab_bundle }}/script.rpm.sh | bash
when: gitlab_installed.failed and ansible_pkg_mgr == "dnf"
- name: Server | Software | GitLab | Install | Install
shell: EXTERNAL_URL="{{ gitlab_url_prefix }}.{{ domain }}" {{ ansible_pkg_mgr }} install -y {{ gitlab_bundle }}
when: gitlab_installed.failed
- name: Server | Software | GitLab | Install | Get Password
shell: cat /etc/gitlab/initial_root_password && cp /etc/gitlab/initial_root_password ~/
register: gitlab_passwd
when: gitlab_installed.failed
- name: Server | Software | GitLab | Install | Print Password
debug:
var: gitlab_passwd.stdout_lines
when: gitlab_installed.failed
## Configuration ##
# https://docs.gitlab.com/ee/install/next_steps.html
# Need to make server think it's https but not actually listen for it, otherwise reverse proxy doesn't work.
# https://www.itsfullofstars.de/2019/06/gitlab-behind-a-reverse-proxy/
- name: Server | Software | GitLab | Configure |Check External URL
lineinfile:
path: "{{ gitlab_config }}"
regexp: '^external_url '
line: "external_url '{{ gitlab_url_prefix }}.{{ domain }}' # Managed by Ansible"
state: present
create: yes
backup: yes
- name: Server | Software | GitLab | Configure | Turn Off Serving Local SSL
blockinfile:
path: "{{ gitlab_config }}"
block: |
nginx['listen_port'] = 80
nginx['listen_https'] = false
marker: "# {mark} MANAGED BY ANSIBLE - {{ gitlab_config }}"
state: present
create: yes
backup: yes
- name: Server | Software | GitLab | Configure | Reconfigure
shell: gitlab-ctl reconfigure

View File

@ -9,3 +9,4 @@
job: "sudo freebsd-update cron -t me@hyperling.com" job: "sudo freebsd-update cron -t me@hyperling.com"
state: present state: present
disabled: no disabled: no

View File

@ -0,0 +1,73 @@
---
# Nice, simple, and easy to use tiling window manager.
# https://dwm.suckless.org/
# https://sites.google.com/site/lazyboxx/-articles/dwm-a-newbie-s-guide#TOC-Status-Bar
## Pre-reqs ##
- name: Workstation | Linux | Software | DWM | Pre-Reqs
package:
name:
- git
- "{{ make }}"
- "{{ dmenu }}"
- "{{ font_awesome }}"
update_cache: yes
## Download ##
- name: Workstation | Linux | Software | DWM | Git Clone
git:
repo: https://git.suckless.org/dwm
dest: "{{ dwm_install_dir }}"
clone: yes
force: yes
- name: Workstation | Linux | Software | DWM | Git Clone (st)
git:
repo: https://git.suckless.org/st
dest: "{{ st_install_dir }}"
clone: yes
force: yes
## Configuration ##
- name: Workstation | Linux | Software | DWM | Config File
copy:
src: dwm/config.h
dest: "{{ dwm_install_dir }}"
owner: root
group: "{{ root_group }}"
mode: 0755
## Install ##
- name: Workstation | Linux | Software | DWM | Install
shell: "cd {{ dwm_install_dir }}; {{ make }} clean install"
- name: Workstation | Linux | Software | DWM | Install (st)
shell: "cd {{ st_install_dir }}; {{ make }} clean install"
## X Init Sript ##
- name: Workstation | Linux | Software | DWM | Shell Script
copy:
src: dwm/dwm.sh
dest: "{{ global_bin }}"
owner: root
group: "{{ root_group }}"
mode: 0755
## Desktop File ##
- name: Workstation | Linux | Software | DWM | Desktop File
copy:
src: dwm/dwm.desktop
dest: "{{ x_desktops }}"
owner: root
group: "{{ root_group }}"
mode: 0644

View File

@ -2,6 +2,7 @@
# Use flatpaks because they're consistent! :) # Use flatpaks because they're consistent! :)
## Flatpak Pre-reqs ## ## Flatpak Pre-reqs ##
- name: Workstation | Linux | Flatpak Distro | Flatpak | Install - name: Workstation | Linux | Flatpak Distro | Flatpak | Install
package: package:
name: flatpak name: flatpak
@ -14,23 +15,56 @@
method: system method: system
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
- name: Workstation | Linux | Flatpak Distro | Flatpak | Add Flathub for System (#2)
flatpak_remote:
name: flathub2
state: present
method: system
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
## Flatpak Installs ## ## Flatpak Installs ##
- name: Workstation | Linux | Flatpak Distro | Flatpak | Variables - name: Workstation | Linux | Flatpak Distro | Flatpak | Variables
set_fact: set_fact:
flatpak_exec_dir: "{{ user_ling.home }}/bin" flatpak_exec_dir: "{{ user_ling.home }}/bin"
flatpak_exec: "flatpak run"
# Generic # - name: Workstation | Linux | Flatpak Distro | Flatpak | Arrays
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Array
set_fact: set_fact:
flatpaks_generic: flatpaks_generic:
- { app: "org.libreoffice.LibreOffice", name: "office" } - { app: "org.libreoffice.LibreOffice", name: "office", extra: "" }
- { app: "com.discordapp.Discord", name: "discord" } - { app: "org.telegram.desktop", name: "telegram", extra: "" }
- { app: "org.telegram.desktop", name: "telegram" } - { app: "io.lbry.lbry-app", name: "lbry", extra: "dbus-launch" }
- { app: "io.lbry.lbry-app", name: "lbry" } - { app: "org.signal.Signal", name: "signal", extra: "" }
- { app: "io.gitlab.librewolf-community", name: "librewolf", extra: "" }
flatpaks_coding:
- { app: "com.vscodium.codium", name: "codium", extra: "" }
- { app: "com.google.AndroidStudio", name: "android-studio", extra: "" }
- { app: "com.jetbrains.PyCharm-Community", name: "pycharm", extra: "" }
- { app: "io.dbeaver.DBeaverCommunity", name: "dbeaver", extra: "" }
flatpaks_editing:
- { app: "org.shotcut.Shotcut", name: "shotcut", extra: "" }
- { app: "com.obsproject.Studio", name: "obs", extra: "" }
- { app: "org.gimp.GIMP", name: "gimp", extra: "" }
flatpaks_gaming:
- { app: "com.valvesoftware.Steam", name: "steam", extra: "" }
- { app: "com.play0ad.zeroad", name: "zeroad", extra: "" }
- { app: "net.supertuxkart.SuperTuxKart", name: "tuxkart", extra: "" }
flatpaks_remove:
- { app: "org.mozilla.firefox", name: "firefox", extra: "" }
- { app: "com.visualstudio.code", name: "vscode", extra: "" } # Why does this throw an error? It's the correct ID.
- { app: "com.visualstudio.code-oss", name: "code-oss", extra: "" }
- { app: "org.midori_browser.Midori", name: "midori", extra: "" }
- { app: "com.github.Eloston.UngoogledChromium", name: "unchrome", extra: "" }
- { app: "org.gnome.Evolution", name: "evolution", extra: "" } # Doesn't pick up GNOME theme since contained.
- { app: "org.mozilla.Thunderbird", name: "thunderbird", extra: "" } # Doesn't integrate with Nextcloud as well as Evolution.
- { app: "org.audacityteam.Audacity", name: "audacity", extra: "" } # Say "no thanks" to spyware.
- { app: "com.discordapp.Discord", name: "discord", extra: "" } # Stopped working, just spins and says Starting.
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Installs # Generic #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Installs
flatpak: flatpak:
name: "{{ item.app }}" name: "{{ item.app }}"
remote: flathub remote: flathub
@ -38,11 +72,11 @@
loop: "{{ flatpaks_generic }}" loop: "{{ flatpaks_generic }}"
ignore_errors: yes ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Executables - name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executables
blockinfile: blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}" path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: | block: |
flatpak run {{ item.app }} {{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}' marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}" marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0" marker_end: "exit 0"
@ -51,7 +85,7 @@
loop: "{{ flatpaks_generic }}" loop: "{{ flatpaks_generic }}"
become_user: ling become_user: ling
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic Executable Permissions - name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executable Permissions
file: file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}" path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file state: file
@ -59,99 +93,177 @@
loop: "{{ flatpaks_generic }}" loop: "{{ flatpaks_generic }}"
# Coding # # Coding #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding Installs
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Installs
flatpak: flatpak:
name: "{{ item }}" name: "{{ item.app }}"
remote: flathub remote: flathub
state: present state: present
loop: loop: "{{ flatpaks_coding }}"
- com.vscodium.codium
- com.google.AndroidStudio
- com.jetbrains.PyCharm-Community
- io.dbeaver.DBeaverCommunity
ignore_errors: yes ignore_errors: yes
when: coding is defined when: coding is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding Uninstalls - name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
loop: "{{ flatpaks_coding }}"
become_user: ling
when: coding is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file
mode: '0755'
loop: "{{ flatpaks_coding }}"
when: coding is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Uninstall
flatpak: flatpak:
name: "{{ item }}" name: "{{ item.app }}"
remote: flathub remote: flathub
state: absent state: absent
loop: loop: "{{ flatpaks_coding }}"
- com.vscodium.codium ignore_errors: yes
- com.google.AndroidStudio when: coding is not defined
- com.jetbrains.PyCharm-Community
- io.dbeaver.DBeaverCommunity - name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes ignore_errors: yes
when: coding is not defined when: coding is not defined
# Media Editors # # Media Editors #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Installs
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Installs
flatpak: flatpak:
name: "{{ item }}" name: "{{ item.app }}"
remote: flathub remote: flathub
state: present state: present
loop: loop: "{{ flatpaks_editing }}"
- org.shotcut.Shotcut
- com.obsproject.Studio
- org.gimp.GIMP
ignore_errors: yes ignore_errors: yes
when: editing is defined when: editing is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
loop: "{{ flatpaks_editing }}"
become_user: ling
when: editing is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file
mode: '0755'
loop: "{{ flatpaks_editing }}"
when: editing is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Uninstalls - name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editor Uninstalls
flatpak: flatpak:
name: "{{ item }}" name: "{{ item.app }}"
remote: flathub remote: flathub
state: absent state: absent
loop: loop: "{{ flatpaks_editing }}"
- org.shotcut.Shotcut ignore_errors: yes
- com.obsproject.Studio when: editing is not defined
- org.gimp.GIMP
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: absent
loop: "{{ flatpaks_editing }}"
ignore_errors: yes ignore_errors: yes
when: editing is not defined when: editing is not defined
# Gaming # # Gaming #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming Installs
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Installs
flatpak: flatpak:
name: "{{ item }}" name: "{{ item.app }}"
remote: flathub remote: flathub
state: present state: present
loop: loop: "{{ flatpaks_gaming }}"
- com.valvesoftware.Steam
ignore_errors: yes ignore_errors: yes
when: gaming is defined when: gaming is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming Uninstalls - name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executables
blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
marker: '{mark}'
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
loop: "{{ flatpaks_gaming }}"
become_user: ling
when: gaming is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executable Permissions
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: file
mode: '0755'
loop: "{{ flatpaks_gaming }}"
when: gaming is defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Uninstalls
flatpak: flatpak:
name: "{{ item }}" name: "{{ item.app }}"
remote: flathub remote: flathub
state: absent state: absent
loop: loop: "{{ flatpaks_gaming }}"
- com.valvesoftware.Steam ignore_errors: yes
when: gaming is not defined
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Remove Executables
file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}"
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes ignore_errors: yes
when: gaming is not defined when: gaming is not defined
# Removals # # Removals #
- name: Workstation | Linux | Flatpak Distro | Flatpak | Application Uninstalls
- name: Workstation | Linux | Flatpak Distro | Flatpak | Uninstalls | Uninstall
flatpak: flatpak:
name: "{{ item }}" name: "{{ item.app }}"
remote: flathub remote: flathub
state: absent state: absent
loop: loop: "{{ flatpaks_remove }}"
- org.mozilla.firefox ignore_errors: yes
- com.visualstudio.code # Why does this throw an error? It's the correct ID.
- com.visualstudio.code-oss - name: Workstation | Linux | Flatpak Distro | Flatpak | Uninstalls | Remove Executables
- org.midori_browser.Midori file:
- com.github.Eloston.UngoogledChromium path: "{{ flatpak_exec_dir }}/{{ item.name }}"
- org.gnome.Evolution # Doesn't pick up GNOME theme since contained. state: absent
- org.mozilla.Thunderbird # Doesn't integrate with Nextcloud as well as Evolution. loop: "{{ flatpaks_remove }}"
- org.audacityteam.Audacity # Say "no thanks" to spyware.
ignore_errors: yes ignore_errors: yes
## Other Stuff ## ## Other Stuff ##
# Software not yet available or working properly in Flatpak form. # Software not yet available or working properly in Flatpak form.
- name: Workstation | Linux | Flatpak Distro | Package Manager | Install From Repo - name: Workstation | Linux | Flatpak Distro | Package Manager | Install From Repo
package: package:
name: name:
@ -170,12 +282,14 @@
when: firefox != firefox_esr when: firefox != firefox_esr
# Lutris # # Lutris #
- name: Workstation | Linux | Flatpak Distro | Package Manager | Add Lutris PPA (Ubuntu) - name: Workstation | Linux | Flatpak Distro | Package Manager | Add Lutris PPA (Ubuntu)
apt_repository: apt_repository:
repo: ppa:lutris-team/lutris repo: ppa:lutris-team/lutris
update_cache: yes update_cache: yes
state: present state: present
when: ansible_distribution == "Ubuntu" and gaming is defined when: ansible_distribution == "Ubuntu" and gaming is defined
ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Package Manager | Add Lutris (besides ARM) - name: Workstation | Linux | Flatpak Distro | Package Manager | Add Lutris (besides ARM)
package: package:
@ -183,14 +297,15 @@
- lutris - lutris
state: present state: present
when: ansible_architecture != "aarch64" and gaming is defined when: ansible_architecture != "aarch64" and gaming is defined
ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Lutris (besides ARM) - name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Lutris (besides ARM)
package: package:
name: name:
- lutris - lutris
state: absent state: absent
ignore_errors: yes
when: ansible_architecture != "aarch64" and gaming is not defined when: ansible_architecture != "aarch64" and gaming is not defined
ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Lutris PPA (Ubuntu) - name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Lutris PPA (Ubuntu)
apt_repository: apt_repository:
@ -198,8 +313,10 @@
update_cache: yes update_cache: yes
state: absent state: absent
when: ansible_distribution == "Ubuntu" and gaming is not defined when: ansible_distribution == "Ubuntu" and gaming is not defined
ignore_errors: yes
# Remove Repo Software # # Remove Repo Software #
- name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Applications - name: Workstation | Linux | Flatpak Distro | Package Manager | Remove Applications
package: package:
name: name:

View File

@ -2,3 +2,6 @@
# Download and install DMG files that are not yet in Homebrew. # Download and install DMG files that are not yet in Homebrew.
# macFUSE, sshfs, balena-etcher # macFUSE, sshfs, balena-etcher
- name: Workstation | Mac OS | Software | DMGs | TBD
shell: echo TBD

View File

@ -2,7 +2,7 @@
# GNOME settings, extensions, and setup. # GNOME settings, extensions, and setup.
# Check for special software that may need added to favorites. # Check for special software that may need added to favorites.
- name: Workstation | Account Management | GNOME | Checks | Defaults - name: Workstation | Account Management | GNOME | Facts | Defaults
set_fact: set_fact:
browser: "com.github.Eloston.UngoogledChromium.desktop" browser: "com.github.Eloston.UngoogledChromium.desktop"
@ -13,9 +13,19 @@
- name: Workstation | Account Management | GNOME | Checks | Brave | Set As Browser - name: Workstation | Account Management | GNOME | Checks | Brave | Set As Browser
set_fact: set_fact:
browser: brave-browser.desktop browser: "brave-browser.desktop"
when: not brave.failed when: not brave.failed
#- name: Workstation | Account Management | GNOME | Checks | LibreWolf | Locate
# shell: which librewolf
# register: librewolf
# ignore_errors: yes
#
#- name: Workstation | Account Management | GNOME | Checks | LibreWolf | Set As Browser
# set_fact:
# browser: "io.gitlab.librewolf-community.desktop"
# when: not librewolf.failed or (flatpak_distro is defined and flatpak_distro)
# Make sure Gnome-Tweaks is installed # Make sure Gnome-Tweaks is installed
- name: Workstation | Account Management | GNOME | Install Dependencies - name: Workstation | Account Management | GNOME | Install Dependencies
@ -54,6 +64,7 @@
name: name:
- "{{ make }}" - "{{ make }}"
- "{{ msgfmt }}" - "{{ msgfmt }}"
- "{{ sassc }}"
state: present state: present
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
@ -153,11 +164,11 @@
dconf: dconf:
key: /org/gnome/shell/favorite-apps key: /org/gnome/shell/favorite-apps
value: "['org.gnome.Terminal.desktop', 'gnome-system-monitor.desktop', 'org.gnome.Nautilus.desktop', value: "['org.gnome.Terminal.desktop', 'gnome-system-monitor.desktop', 'org.gnome.Nautilus.desktop',
'{{ browser }}', 'org.gnome.Evolution.desktop', 'io.gitlab.librewolf-community.desktop', '{{ browser }}', 'org.gnome.Evolution.desktop',
'com.vscodium.codium.desktop', 'org.shotcut.Shotcut.desktop', 'com.vscodium.codium.desktop', 'org.shotcut.Shotcut.desktop',
'org.telegram.desktop.desktop', 'com.discordapp.Discord.desktop', 'org.telegram.desktop.desktop', 'com.discordapp.Discord.desktop',
'rhythmbox.desktop', 'io.lbry.lbry-app.desktop', 'io.lbry.lbry-app.desktop',
'com.valvesoftware.Steam.desktop', 'net.lutris.Lutris.desktop']" 'com.valvesoftware.Steam.desktop']"
state: present state: present
become_user: ling become_user: ling
when: ansible_system == "Linux" when: ansible_system == "Linux"

View File

@ -1,2 +1,5 @@
--- ---
# Allow remote viewing desktops via VNC. # Allow remote viewing desktops via VNC.
- name: General | Software | Services | VNC | TBD
shell: echo "TBD"