Compare commits
47 Commits
671d21b9d3
...
stage
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e46cb16a5 | |||
| 785db7e893 | |||
| 94431dff43 | |||
| dcf4b3d451 | |||
| 58f5f13b28 | |||
| fe022d7a9c | |||
| 0ef5e0cc6a | |||
| ccabad9c30 | |||
| f83fe61296 | |||
| da9c34a9da | |||
| 8c3c3fb381 | |||
| d617334a54 | |||
| 52c6dba409 | |||
| 21d69f230b | |||
| 3a815d319c | |||
| 94b6db2000 | |||
| 564485145e | |||
| 814451fa44 | |||
| bd9460c8bb | |||
| 55a531f1b4 | |||
| c2f910aabc | |||
| ccfa27fcaf | |||
| 3c6c7de5e1 | |||
| 24c5a2973f | |||
| 262cfa002e | |||
| 4fe8daf347 | |||
| ea589d09b2 | |||
| dd0412d821 | |||
| 14a0d21633 | |||
| 0d42c2419c | |||
| ccd87b92bb | |||
| 82e32c0f95 | |||
| 73dfdce734 | |||
| bf57faaac5 | |||
| 9406d4aca2 | |||
| 4cf848d4a9 | |||
| 09f6a1e96b | |||
| 2d5fa52294 | |||
| d54131a1b2 | |||
| 8a79822ae5 | |||
| c66938f738 | |||
| be849d9c70 | |||
| b69be78382 | |||
| 845b042d21 | |||
| 42b88fb8bd | |||
| e98ad94a90 | |||
| dfb72122a0 |
@@ -19,28 +19,32 @@ This information is as of 2025-11-21.
|
||||
|
||||
These are the operating systems used as my daily driver.
|
||||
|
||||
#### Artix (`runit`)
|
||||
|
||||
2026-08-04: Completed adapting playbooks and now using this as a daily driver.
|
||||
|
||||
2026-07-31: Began experimenting and adapting playbooks using VMs.
|
||||
|
||||
#### Debian Trixie
|
||||
|
||||
This has been used as my primary server and workstation OS since at least 2024.
|
||||
|
||||
The `apt` version of `ansible` in both Bookworm and Trixie are sufficient,
|
||||
no longer need to use `ansible` out of `pip`.
|
||||
|
||||
Stopped using as a workstation on all devices in August 2026.
|
||||
|
||||
#### Devuan (with `runit`)
|
||||
#### Devuan (`runit`)
|
||||
|
||||
2026-07-30: Distribution has beed added with a few caveats.
|
||||
|
||||
- `runit` is the currently the expected init system (not OpenRC or SysVInit)
|
||||
- Mullvad needs installed via .dev file [here]().
|
||||
|
||||
#### Artix Linux (OpenRC or runit)
|
||||
|
||||
2026-07-31: Began experimenting and adapting playbooks using VMs.
|
||||
- Mullvad needs installed via .dev file [TBD: link here]().
|
||||
|
||||
### Secondary
|
||||
|
||||
These are tested via my Docker project's `ProvisionsTests` container but not currently used as daily drivers.
|
||||
These are tested via my Docker project's `ProvisionsTests` containers
|
||||
but not currently used as daily drivers. [TBD: Link]()
|
||||
|
||||
#### Arch
|
||||
|
||||
|
||||
@@ -10,14 +10,15 @@
|
||||
nethogs: nethogs
|
||||
ntp_server: chrony
|
||||
dig: dig
|
||||
neofetch: neofetch
|
||||
neofetch: fastfetch
|
||||
lightdm: lightdm
|
||||
sddm: sddm
|
||||
tmux: tmux
|
||||
base_devel: htop # Placeholder for Arch package.
|
||||
macbook_wifi_driver: broadcom-sta-dkms
|
||||
xz: xz
|
||||
mesa: mesa
|
||||
sendmail: msmtp
|
||||
sendmail_mta: msmtp-mta
|
||||
ca_certificates: ca-certificates
|
||||
locate: mlocate
|
||||
|
||||
- name: General | Facts | Package | Parrot OS Fixes
|
||||
set_fact:
|
||||
@@ -34,9 +35,6 @@
|
||||
cron: cron
|
||||
encfs: encfs
|
||||
dig: dnsutils
|
||||
neofetch: fastfetch
|
||||
xz: xz-utils
|
||||
mesa: libglu1-mesa
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: General | Facts | Package | pacman
|
||||
@@ -49,8 +47,6 @@
|
||||
encfs: encfs
|
||||
dig: bind
|
||||
base_devel: base-devel
|
||||
macbook_wifi_driver: broadcom-wl-dkms
|
||||
mesa: mesa-utils mesa
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
- name: General | Facts | Package | FreeBSD
|
||||
@@ -65,7 +61,7 @@
|
||||
encfs: fusefs-encfs
|
||||
when: ansible_system == "FreeBSD"
|
||||
|
||||
- name: General | Facts | Package | dnf (Fixes) # TBD: Fix + test package names: mlocate, dig, neofetch
|
||||
- name: General | Facts | Package | dnf (Fixes)
|
||||
set_fact:
|
||||
ansible_pkg_mgr: dnf
|
||||
when: ansible_pkg_mgr in ("dnf5")
|
||||
@@ -79,6 +75,8 @@
|
||||
microcode_intel: microcode_ctl
|
||||
cron: cronie
|
||||
encfs: fuse-encfs
|
||||
dig: bind-utils
|
||||
sendmail_mta: msmtp
|
||||
when: ansible_pkg_mgr == "dnf"
|
||||
|
||||
- name: General | Facts | Package | zypper
|
||||
@@ -89,6 +87,7 @@
|
||||
microcode_intel: ucode-intel
|
||||
cron: cronie
|
||||
encfs: encfs
|
||||
dig: bind-utils
|
||||
when: ansible_pkg_mgr == "zypper"
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
set_fact:
|
||||
crond: cronie
|
||||
crond_pattern: cronie
|
||||
when: ansible_distribution in ("Archlinux")
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
- name: General | Facts | Service | Fedora
|
||||
set_fact:
|
||||
|
||||
@@ -27,15 +27,55 @@
|
||||
sassc: sassc
|
||||
ffmpeg: ffmpeg
|
||||
wireless_tools: wireless-tools
|
||||
macbook_wifi_driver: broadcom-sta-dkms
|
||||
xz: xz
|
||||
mesa: mesa
|
||||
mesa_utils: mesa-utils
|
||||
ninja: ninja
|
||||
notify_send: libnotify
|
||||
fyi: fyi
|
||||
gtk3: gtk3
|
||||
xz_libs: xz
|
||||
cpp: libstdc++
|
||||
c_libs: glibc
|
||||
cpp_libs: libstdc++
|
||||
z_libs: zlib
|
||||
bzip: bzip2
|
||||
dunst: dunst
|
||||
android_jdk: openjdk
|
||||
ncurses: ncurses
|
||||
android_fastboot: fastboot
|
||||
android_adb: adb
|
||||
android_sdkmanager: sdkmanager
|
||||
android_udev: android-udev
|
||||
gnome_boxes: gnome-boxes
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | apt (All Distros)
|
||||
set_fact:
|
||||
xz: xz-utils
|
||||
mesa: libglu1-mesa
|
||||
mesa_utils: libglu1-mesa
|
||||
ninja: ninja-build
|
||||
notify_send: libnotify-bin
|
||||
gtk3: libgtk-3-dev
|
||||
xz_libs: liblzma-dev
|
||||
cpp: libstdc++-12-dev
|
||||
c_libs: libc6:amd64
|
||||
cpp_libs: libstdc++6
|
||||
z_libs: lib32z1
|
||||
bzip: libbz2-1.0
|
||||
android_jdk: default-jdk
|
||||
ncurses: libncurses5
|
||||
android_udev: android-udev-rules
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: Workstation | Facts | Package | Pop_OS!
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
firefox_esr: firefox
|
||||
when: ansible_distribution == "Pop!_OS"
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | Ubuntu
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
@@ -43,28 +83,33 @@
|
||||
dmenu: suckless-tools
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | Debian & Devuan
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
dmenu: suckless-tools
|
||||
firefox: firefox-esr
|
||||
when: ansible_distribution in ("Debian", "Devuan")
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | Mint
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
firefox_esr: firefox
|
||||
when: ansible_distribution == "Linux Mint"
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | Parrot OS
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
firefox_esr: firefox-esr
|
||||
when: ansible_distribution == "Parrot OS"
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | pacman (All Distros)
|
||||
set_fact:
|
||||
macbook_wifi_driver: broadcom-wl-dkms
|
||||
android_jdk: jdk-openjdk
|
||||
android_fastboot: android-tools
|
||||
android_adb: android-tools
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
- name: Workstation | Facts | Package | Arch / Manjaro / Artix
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
|
||||
@@ -253,7 +253,7 @@ assign [class="(?i).*Mullvad.*"] $ws10
|
||||
|
||||
## Workspace Specific Workflows ##
|
||||
bindsym $ctrl+$shift+1 workspace $ws1; exec i3-sensible-terminal;
|
||||
bindsym $ctrl+$shift+2 workspace $ws2; exec "firefox-flatpak || firefox || firefox-esr";
|
||||
bindsym $ctrl+$shift+2 workspace $ws2; exec "firefox || firefox-esr || firefox-flatpak";
|
||||
bindsym $ctrl+$shift+3 workspace $ws3; exec codium-flatpak;
|
||||
bindsym $ctrl+$shift+4 workspace $ws4; exec code-flatpak;
|
||||
bindsym $ctrl+$shift+5 workspace $ws5; exec "session; dino"
|
||||
@@ -332,3 +332,6 @@ exec light -O
|
||||
exec light -N 0
|
||||
|
||||
exec setxkbmap -layout us -variant altgr-intl
|
||||
|
||||
exec --no-startup-id dunst
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"save_loc2": "~/.var/app/com.vscodium.codium/config/VSCodium/{{ user_desc }}/settings.json",
|
||||
"END_COMMENTS": "",
|
||||
|
||||
"update.showReleaseNotes": false,
|
||||
"workbench.startupEditor": "none",
|
||||
"editor.rulers": [
|
||||
80, 120, 200
|
||||
@@ -18,11 +19,11 @@
|
||||
"files.trimFinalNewlines": true,
|
||||
"git.confirmSync": false,
|
||||
|
||||
"[dart]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnType": true,
|
||||
"editor.selectionHighlight": false,
|
||||
"editor.tabCompletion": "onlySnippets",
|
||||
"editor.wordBasedSuggestions": "off"
|
||||
}
|
||||
"[dart]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnType": true,
|
||||
"editor.selectionHighlight": false,
|
||||
"editor.tabCompletion": "onlySnippets",
|
||||
"editor.wordBasedSuggestions": "off"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
when: ansible_system == "FreeBSD"
|
||||
|
||||
- include_tasks: tasks/general/software/aur.yml
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
# Gather again in case missing programs have now been installed.
|
||||
- include_tasks: facts/general/gather.yml
|
||||
@@ -130,8 +131,7 @@
|
||||
|
||||
# Window Managers without true Desktop Environments #
|
||||
- include_tasks: tasks/workstation/shared/software/dwm.yml
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/i3.yml
|
||||
- include_tasks: tasks/workstation/shared/software/i3.yml
|
||||
|
||||
# Polished Desktop Environments #
|
||||
- include_tasks: tasks/workstation/freebsd/software/gnome.yml
|
||||
@@ -141,7 +141,6 @@
|
||||
block:
|
||||
- include_tasks: tasks/workstation/linux/software/gnome.yml
|
||||
when: ansible_service_mgr == "systemd"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/cinnamon.yml
|
||||
- include_tasks: tasks/workstation/linux/software/lxqt.yml
|
||||
when: ansible_system == "Linux"
|
||||
@@ -149,21 +148,15 @@
|
||||
|
||||
## Software Tasks ##
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/packages.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/tlp.yml
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/lutris.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/vscodium.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/brave.yml
|
||||
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/vpn.yml
|
||||
- block:
|
||||
- include_tasks: tasks/workstation/linux/software/packages.yml
|
||||
- include_tasks: tasks/workstation/linux/software/tlp.yml
|
||||
- include_tasks: tasks/workstation/linux/software/lutris.yml
|
||||
- include_tasks: tasks/workstation/linux/software/vscodium.yml
|
||||
- include_tasks: tasks/workstation/linux/software/vpn.yml
|
||||
- include_tasks: tasks/workstation/linux/software/nodejs.yml
|
||||
- include_tasks: tasks/workstation/linux/software/brave.yml
|
||||
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- include_tasks: tasks/workstation/freebsd/software/packages.yml
|
||||
@@ -172,17 +165,16 @@
|
||||
- include_tasks: tasks/workstation/mac-os/software/brew.yml
|
||||
when: ansible_system == "Darwin"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/nodejs.yml
|
||||
|
||||
## Configuration Tasks ##
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
||||
when: not mobile
|
||||
- include_tasks: tasks/workstation/shared/settings/cinnamon.yml
|
||||
when: not mobile
|
||||
- block:
|
||||
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
||||
- include_tasks: tasks/workstation/shared/settings/cinnamon.yml
|
||||
|
||||
- include_tasks: tasks/workstation/linux/cron/ansible.yml
|
||||
when: ansible_system == "Linux" and not mobile
|
||||
- include_tasks: tasks/workstation/linux/cron/ansible.yml
|
||||
when: ansible_system == "Linux"
|
||||
when: not mobile
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/nfs.yml
|
||||
|
||||
@@ -193,20 +185,17 @@
|
||||
when: vnc == true
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/services.yml
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/templates.yml
|
||||
|
||||
## Final Tasks (SLOW) ##
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/flutter.yml
|
||||
- block:
|
||||
- include_tasks: tasks/workstation/linux/software/flutter.yml
|
||||
- include_tasks: tasks/workstation/linux/software/android.yml
|
||||
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
|
||||
when: flatpak_distro
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/android.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
|
||||
when: ansible_system == "Linux" and flatpak_distro
|
||||
|
||||
when: workstation == true
|
||||
|
||||
|
||||
@@ -259,22 +248,21 @@
|
||||
|
||||
- include_tasks: tasks/server/software/services.yml
|
||||
|
||||
- include_tasks: tasks/server/software/certbot.yml
|
||||
when: certbot == true
|
||||
- include_tasks: tasks/server/cron/certbot.yml
|
||||
- block:
|
||||
- include_tasks: tasks/server/software/certbot.yml
|
||||
- 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"
|
||||
- block:
|
||||
- include_tasks: tasks/server/software/onlyoffice.yml
|
||||
when: onlyoffice == true
|
||||
- include_tasks: tasks/server/software/influxdb1.yml
|
||||
when: influxdb1 == true
|
||||
- include_tasks: tasks/server/software/influxdb2.yml
|
||||
when: influxdb2 == true
|
||||
- include_tasks: tasks/server/software/grafana.yml
|
||||
when: grafana == true
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
- include_tasks: tasks/server/software/hugo.yml
|
||||
when: hugo == true
|
||||
|
||||
@@ -7,12 +7,23 @@ DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
PROG="$(basename -- "${BASH_SOURCE[0]}")"
|
||||
LOCAL=$DIR/local.yml
|
||||
URL="https://git.hyperling.com/me/env-ansible"
|
||||
BRANCH="main"
|
||||
if [[ -z $BRANCH ]]; then
|
||||
export BRANCH="main"
|
||||
fi
|
||||
|
||||
LINUX_HOSTS_DIR=/etc/ansible
|
||||
LINUX_HOSTS_FILE="$LINUX_HOSTS_DIR/hosts"
|
||||
FREEBSD_HOSTS_DIR="/usr/local/etc/ansible"
|
||||
FREEBSD_HOSTS_FILE="$FREEBSD_HOSTS_DIR/hosts"
|
||||
|
||||
HOSTS_DIR="$LINUX_HOSTS_DIR"
|
||||
HOSTS_FILE="$LINUX_HOSTS_FILE"
|
||||
|
||||
config_dir="/usr/local/etc/hyperling-scm"
|
||||
general_config="$config_dir/general.ini"
|
||||
workstation_config="$config_dir/workstation.ini"
|
||||
server_config="$config_dir/server.ini"
|
||||
branch=""
|
||||
|
||||
## Functions ##
|
||||
|
||||
@@ -45,10 +56,10 @@ while getopts ":lb:gwsfh" arg; do
|
||||
case $arg in
|
||||
l) local="Y" && echo "Running $LOCAL as the playbook." ;;
|
||||
b) branch="$OPTARG" && echo "Using branch $branch instead of $BRANCH." ;;
|
||||
g) create_general="Y" && echo "Requested '$general_config'." ;;
|
||||
w) create_workstation="Y" && echo "Requested '$workstation_config'." ;;
|
||||
s) create_server="Y" && echo "Requested '$server_config'." ;;
|
||||
f) show_facts="Y" ;;
|
||||
g) create_general="Y" && echo "Generating test '$general_config'." ;;
|
||||
w) create_workstation="Y" && echo "Generating test '$workstation_config'." ;;
|
||||
s) create_server="Y" && echo "Generating test '$server_config'." ;;
|
||||
f) show_facts="Y" && echo "Displaying ansible facts then exiting." ;;
|
||||
h) usage ;;
|
||||
*) echo "ERROR: Parameter $OPTARG was not recognized." && usage 1 ;;
|
||||
esac
|
||||
@@ -60,9 +71,13 @@ if [[ ! -z $1 && $1 != "-"* ]]; then
|
||||
usage 1
|
||||
fi
|
||||
|
||||
if [[ -z "$local" && "$branch" == "" ]]; then
|
||||
echo "Using default branch $BRANCH."
|
||||
if [[ "$branch" == "" ]]; then
|
||||
branch="$BRANCH"
|
||||
if [[ -z "$local" ]]; then
|
||||
echo "Running against default branch '$branch'."
|
||||
else
|
||||
echo "Set branch to '$branch'."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$create_general" && -f "$general_config" ]]; then
|
||||
@@ -92,41 +107,41 @@ if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
|
||||
if [[ $os == *Debian* || $os == *Ubuntu* || $os == *"Pop!_OS"* || $os == *Mint* || $os == *Parrot* ]]; then
|
||||
sudo apt update
|
||||
sudo apt install -y ansible git <<< N
|
||||
sudo mkdir -p /etc/ansible
|
||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||
elif [[ $os == *FreeBSD* ]]; then
|
||||
sudo pkg install -y py38-ansible git
|
||||
sudo mkdir -p /usr/local/etc/ansible
|
||||
sudo sh -c 'echo "localhost ansible_connection=local" > /usr/local/etc/ansible/hosts'
|
||||
sudo pkg install -y -g py*-ansible git
|
||||
HOSTS_DIR="$FREEBSD_HOSTS_DIR"
|
||||
HOSTS_FILE="$FREEBSD_HOSTS_FILE"
|
||||
elif [[ $os == *Arch* || $os == *Manjaro* || $os == *Artix* ]]; then
|
||||
sudo pacman -Sy --noconfirm ansible git
|
||||
sudo mkdir -p /etc/ansible
|
||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||
elif [[ $os == *Darwin* ]]; then
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
echo "TESTING - EXIT!"
|
||||
exit 0
|
||||
brew install ansible git
|
||||
HOSTS_DIR=""
|
||||
HOSTS_FILE=""
|
||||
elif [[ $os == *Fedora* ]]; then
|
||||
sudo dnf install -y ansible git python3-libselinux
|
||||
sudo mkdir -p /etc/ansible
|
||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||
elif [[ $os == *openSUSE* ]]; then
|
||||
sudo zypper install -y ansible git
|
||||
sudo mkdir -p /etc/ansible
|
||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||
elif [[ $os == *NixOS* ]]; then
|
||||
$DIR/files/scripts/nixos.sh -b $branch
|
||||
sudo mkdir -p /etc/ansible
|
||||
sudo sh -c 'echo "localhost ansible_connection=local" > /etc/ansible/hosts'
|
||||
else
|
||||
echo -e "ERROR: OS not detected."
|
||||
echo -e "ERROR: OS not recognized."
|
||||
echo -e "$os"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "Installed!"
|
||||
|
||||
if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
|
||||
echo "Ensuring hosts file exists..."
|
||||
if [[ ! -e $HOSTS_FILE ]]; then
|
||||
sudo mkdir -pv $HOSTS_DIR
|
||||
sudo sh -c "echo 'localhost ansible_connection=local' > $HOSTS_FILE"
|
||||
fi
|
||||
echo "$HOSTS_FILE: '`cat $HOSTS_FILE`'"
|
||||
echo "Hosts file created successfully!"
|
||||
fi
|
||||
|
||||
if [[ "$show_facts" == "Y" ]]; then
|
||||
echo "Showing Ansible Facts"
|
||||
ansible localhost -m setup --connection=local
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
backup: yes
|
||||
create: no
|
||||
state: present
|
||||
when: ansible_distribution == "Archlinux"
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
#- name: General | Account Management | Users | Use ZSH (Arch+Manjaro)
|
||||
# set_fact:
|
||||
# user_shell: "{{ zsh_exec.stdout }}"
|
||||
# when: ansible_distribution == "Archlinux"
|
||||
# when: ansible_pkg_mgr == "pacman"
|
||||
#
|
||||
#- name: General | Account Management | Users | Allow ZSH (Arch)
|
||||
# lineinfile:
|
||||
@@ -32,7 +32,7 @@
|
||||
# backup: yes
|
||||
# create: no
|
||||
# state: present
|
||||
# when: ansible_distribution == "Archlinux"
|
||||
# when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
|
||||
## Root ##
|
||||
@@ -128,7 +128,17 @@
|
||||
export_path_sbin: export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
|
||||
#export_terminal: export TERMINAL="alacritty" # colors look weird.
|
||||
export_terminal: export TERMINAL="kitty"
|
||||
keyboard_settings: setxkbmap -layout us -variant altgr-intl
|
||||
export_browser: |
|
||||
function find-firefox {
|
||||
which firefox 2>/dev/null ||
|
||||
which firefox-esr 2>/dev/null ||
|
||||
which firefox-flatpak 2>/dev/null
|
||||
}
|
||||
export BROWSER="`find-firefox`"
|
||||
keyboard_settings: |
|
||||
if [[ -n "$XDG_SESSION_ID" ]]; then
|
||||
setxkbmap -layout us -variant altgr-intl
|
||||
fi
|
||||
|
||||
- name: General | Account Management | Users | Files | RC Variables
|
||||
set_fact:
|
||||
@@ -1116,6 +1126,68 @@
|
||||
done
|
||||
sh -c "rm '{{ notify_log_file_wip }}'"
|
||||
fi
|
||||
function_reconnect: |
|
||||
function reconnect {
|
||||
test_domain="git.hyperling.com"
|
||||
test_connection() {
|
||||
ping -c 3 $test_domain
|
||||
status="$?"
|
||||
echo "* Status Returned: '$status'"
|
||||
return $status
|
||||
}
|
||||
test_connection &&
|
||||
echo -e "\n* Looks good! Not trying anything." &&
|
||||
return 0 ||
|
||||
echo -e "\n* Connection failed, troubleshooting..."
|
||||
|
||||
show_connection() {
|
||||
ip addr | grep ' UP '
|
||||
ip addr | grep ' inet'
|
||||
#ip addr | grep -i 'mullvad'
|
||||
}
|
||||
echo -e "\n* Current Connections:"
|
||||
show_connection
|
||||
|
||||
reset_mullvad() {
|
||||
mullvad disconnect && sleep 5 && mullvad connect && sleep 5
|
||||
}
|
||||
echo -e "\n* Turning Mullvad Off & On Again"
|
||||
reset_mullvad
|
||||
echo "Done!"
|
||||
|
||||
echo -e "\n* Checking Connections"
|
||||
show_connection
|
||||
|
||||
echo -e "\n* Testing Again..."
|
||||
test_connection &&
|
||||
echo -e "\n* Looks good! Not trying anything else." &&
|
||||
return 0 ||
|
||||
echo -e "\n* Connection failed, troubleshooting more..."
|
||||
|
||||
reset_wifi() {
|
||||
wifi off
|
||||
sleep 5
|
||||
wifi on
|
||||
sleep 5
|
||||
}
|
||||
echo -e "\n* Turning WiFi Off & On Again"
|
||||
reset_wifi
|
||||
echo "Done!"
|
||||
|
||||
echo -e "\n* Testing Again..."
|
||||
test_connection &&
|
||||
echo -e "\n* Looks good now!" &&
|
||||
return 0 ||
|
||||
echo -e "\n* Connection still failed, maybe try rebooting?"
|
||||
}
|
||||
alias test_wifi="reconnect"
|
||||
alias test_network="reconnect"
|
||||
alias test_connection="reconnect"
|
||||
alias test_connections="reconnect"
|
||||
alias fix_wifi="reconnect"
|
||||
alias fix_network="reconnect"
|
||||
alias fix_connection="reconnect"
|
||||
alias fix_connections="reconnect"
|
||||
|
||||
|
||||
- name: General | Account Management | Users | Files | Common Variable
|
||||
@@ -1124,6 +1196,7 @@
|
||||
{{ export_path_additions }}
|
||||
{{ export_path_sbin }}
|
||||
{{ export_terminal }}
|
||||
{{ export_browser }}
|
||||
{{ keyboard_settings}}
|
||||
rc_common: |
|
||||
# Fixes "command not found" when using aliases within functions.
|
||||
@@ -1203,6 +1276,7 @@
|
||||
{{ alias_commit }}
|
||||
{{ function_loop }}
|
||||
{{ process_notify_log }}
|
||||
{{ function_reconnect }}
|
||||
|
||||
- name: General | Account Management | Users | Files | .profile + .xsessionrc
|
||||
blockinfile:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
- name: General | Software | AUR | Facts 01
|
||||
set_fact:
|
||||
aur_user: aur-user
|
||||
aur_user: aurbuilder
|
||||
aur_build_dir: ~/src
|
||||
aur_helper: yay
|
||||
aur_helper_url: https://aur.archlinux.org/yay-bin.git
|
||||
@@ -12,6 +12,7 @@
|
||||
- name: General | Software | AUR | Facts 02
|
||||
set_fact:
|
||||
aur_helper_dir: "{{ aur_build_dir }}/{{ aur_helper }}"
|
||||
aur_sudoers: "/etc/sudoers.d/sudoers_{{ aur_user }}"
|
||||
|
||||
- name: General | Software | AUR | User
|
||||
user:
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
- name: General | Software | AUR | Sudoers
|
||||
lineinfile:
|
||||
path: /etc/sudoers.d/aurbuilder
|
||||
path: "{{ aur_sudoers }}"
|
||||
line: "{{ aur_user }} ALL=(ALL) NOPASSWD: /usr/bin/pacman"
|
||||
create: true
|
||||
mode: '0440'
|
||||
@@ -42,7 +43,7 @@
|
||||
dest: "{{ aur_helper_dir }}"
|
||||
|
||||
- name: General | Software | AUR | Install | Build & Integrate
|
||||
command: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
|
||||
shell: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
|
||||
changed_when: true
|
||||
|
||||
when: yay_check.rc != 0
|
||||
|
||||
@@ -40,35 +40,38 @@
|
||||
- name: General | Software | Packages | Install Software
|
||||
package:
|
||||
name:
|
||||
- bash
|
||||
- sudo
|
||||
- nmap
|
||||
- "{{ neofetch }}"
|
||||
- "{{ sshfs }}"
|
||||
- "{{ locate }}"
|
||||
- zsh
|
||||
- "{{ opensshd }}"
|
||||
- "{{ tar }}"
|
||||
- curl
|
||||
- at
|
||||
- gcc
|
||||
- vim
|
||||
- "{{ cron }}"
|
||||
- "{{ encfs }}"
|
||||
- rsync
|
||||
- "{{ iftop }}"
|
||||
- "{{ nethogs }}"
|
||||
- "{{ ntp_server }}"
|
||||
- "{{ dig }}"
|
||||
- "{{ tmux }}"
|
||||
- "{{ base_devel }}"
|
||||
- bash
|
||||
- sudo
|
||||
- nmap
|
||||
- "{{ neofetch }}"
|
||||
- "{{ sshfs }}"
|
||||
- "{{ locate }}"
|
||||
- zsh
|
||||
- "{{ opensshd }}"
|
||||
- "{{ tar }}"
|
||||
- curl
|
||||
- at
|
||||
- gcc
|
||||
- vim
|
||||
- "{{ cron }}"
|
||||
- "{{ encfs }}"
|
||||
- rsync
|
||||
- "{{ iftop }}"
|
||||
- "{{ nethogs }}"
|
||||
- "{{ ntp_server }}"
|
||||
- "{{ dig }}"
|
||||
- "{{ tmux }}"
|
||||
- "{{ base_devel }}"
|
||||
- "{{ sendmail }}"
|
||||
- "{{ sendmail_mta }}"
|
||||
- "{{ ca_certificates }}"
|
||||
state: present
|
||||
|
||||
- name: General | Software | Packages | Install Software (DEV)
|
||||
package:
|
||||
name:
|
||||
- "{{ microcode_amd }}"
|
||||
- "{{ microcode_intel }}"
|
||||
- "{{ microcode_amd }}"
|
||||
- "{{ microcode_intel }}"
|
||||
state: present
|
||||
when: branch == "dev"
|
||||
ignore_errors: yes
|
||||
@@ -76,10 +79,10 @@
|
||||
- name: General | Software | Packages | Add Generic Kernel + Tools (Ubuntu)
|
||||
package:
|
||||
name:
|
||||
- linux-image-generic
|
||||
- linux-headers-generic
|
||||
- linux-tools-generic
|
||||
- linux-tools-common
|
||||
- linux-image-generic
|
||||
- linux-headers-generic
|
||||
- linux-tools-generic
|
||||
- linux-tools-common
|
||||
state: present
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
ignore_errors: yes
|
||||
@@ -87,8 +90,8 @@
|
||||
- name: General | Software | Packages | Add Generic Kernel + Headers (Debian)
|
||||
package:
|
||||
name:
|
||||
- linux-image-amd64
|
||||
- linux-headers-amd64
|
||||
- linux-image-amd64
|
||||
- linux-headers-amd64
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
ignore_errors: yes
|
||||
@@ -102,10 +105,10 @@
|
||||
- name: General | Software | Packages | Install "Bloat" (Looking at you, Arch Base)
|
||||
package:
|
||||
name:
|
||||
- which
|
||||
- "{{ cron }}"
|
||||
- which
|
||||
- "{{ cron }}"
|
||||
state: present
|
||||
when: ansible_distribution == "Archlinux"
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
- name: General | Software | Packages | Install Fix (Looking at you, openSUSE)
|
||||
package:
|
||||
@@ -122,17 +125,17 @@
|
||||
- name: General | Software | Packages | Update Software (Disabled)
|
||||
package:
|
||||
name:
|
||||
- ansible
|
||||
- git
|
||||
- ansible
|
||||
- git
|
||||
state: latest
|
||||
when: 1 == 0
|
||||
|
||||
- name: General | Software | Packages | Remove Software
|
||||
package:
|
||||
name:
|
||||
- cowsay # Sorry ;)
|
||||
- chromium
|
||||
- chromium-browser
|
||||
- cowsay # Sorry ;)
|
||||
- chromium
|
||||
- chromium-browser
|
||||
state: absent
|
||||
|
||||
# Ubuntu still uses snap for critical components like GNOME, must keep.
|
||||
@@ -148,7 +151,7 @@
|
||||
- name: General | Software | Packages | Remove Snap (Besides Ubuntu)
|
||||
package:
|
||||
name:
|
||||
- snapd
|
||||
- snapd
|
||||
state: absent
|
||||
when: ansible_distribution != "Ubuntu"
|
||||
ignore_errors: yes
|
||||
@@ -156,7 +159,7 @@
|
||||
- name: General | Software | Packages | Other Debian Packages
|
||||
package:
|
||||
name:
|
||||
- usbutils
|
||||
- usbutils
|
||||
state: present
|
||||
when: ansible_distribution in ("Debian")
|
||||
ignore_errors: yes
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
- "date > {{ services_enabled_file }}"
|
||||
- "echo '\n-= Enabled + Sorted =-\n' >> {{ services_enabled_file }}"
|
||||
- "grep 'enabled' {{ services_report_file }} | sort >> {{ services_enabled_file }}"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
|
||||
- name: General | Tests | Services | Make Viewable
|
||||
file:
|
||||
|
||||
@@ -173,21 +173,23 @@
|
||||
- name: Workstation | Linux | Software | Android | Dependencies [Install]
|
||||
package:
|
||||
name:
|
||||
- default-jdk
|
||||
- libc6
|
||||
- libncurses5
|
||||
- libstdc++6
|
||||
- lib32z1
|
||||
- libbz2-1.0
|
||||
- "{{ android_jdk }}"
|
||||
- "{{ c_libs }}"
|
||||
- "{{ ncurses }}"
|
||||
- "{{ cpp_libs }}"
|
||||
- "{{ z_libs }}"
|
||||
- "{{ bzip }}"
|
||||
- "{{ android_udev }}"
|
||||
state: present
|
||||
when: coding == true
|
||||
|
||||
- name: Workstation | Linux | Software | Android | Dependencies [Remove]
|
||||
package:
|
||||
name:
|
||||
- sdkmanager
|
||||
- "{{ android_sdkmanager }}"
|
||||
state: absent
|
||||
when: coding == true
|
||||
and ansible_pkg_mgr == "apt"
|
||||
|
||||
## Install SDK ##
|
||||
|
||||
@@ -358,17 +360,15 @@
|
||||
- name: Workstation | Linux | Software | Android | System Tools [Install]
|
||||
package:
|
||||
name:
|
||||
- fastboot
|
||||
- adb
|
||||
- "{{ android_fastboot }}"
|
||||
- "{{ android_adb }}"
|
||||
state: present
|
||||
when: not coding == true
|
||||
and ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: Workstation | Linux | Software | Android | System Tools [Remove]
|
||||
package:
|
||||
name:
|
||||
- fastboot
|
||||
- adb
|
||||
- "{{ android_fastboot }}"
|
||||
- "{{ android_adb }}"
|
||||
state: absent
|
||||
when: coding == true
|
||||
and ansible_pkg_mgr == "apt"
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
|
||||
## Facts ##
|
||||
|
||||
- name: Workstation | Linux | Software | Flutter | Facts [1/4]
|
||||
- name: Workstation | Linux | Software | Flutter | Facts 1
|
||||
set_fact:
|
||||
flutter_url: "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.27.2-stable.tar.xz"
|
||||
flutter_download_file: "{{ user_user.home }}/Downloads/flutter.tar.xz"
|
||||
flutter_sdk_location: "{{ user_user.home }}/SDKs/Flutter"
|
||||
flutter_report: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.sdk.flutter.txt"
|
||||
|
||||
- name: Workstation | Linux | Software | Flutter | Facts [2/4]
|
||||
- name: Workstation | Linux | Software | Flutter | Facts 2
|
||||
set_fact:
|
||||
flutter_bin_location: "{{ flutter_sdk_location }}/flutter/bin"
|
||||
|
||||
- name: Workstation | Linux | Software | Flutter | Facts [3/4]
|
||||
- name: Workstation | Linux | Software | Flutter | Facts 3
|
||||
set_fact:
|
||||
flutter: "{{ flutter_bin_location }}/flutter"
|
||||
|
||||
- name: Workstation | Linux | Software | Flutter | Facts [3/3]
|
||||
- name: Workstation | Linux | Software | Flutter | Facts 4
|
||||
set_fact:
|
||||
flutter_report_commands:
|
||||
- "date > {{ flutter_report }}"
|
||||
@@ -56,6 +56,7 @@
|
||||
- "{{ xz }}"
|
||||
- zip
|
||||
- "{{ mesa }}"
|
||||
- "{{ mesa_utils }}"
|
||||
state: present
|
||||
when: coding == true
|
||||
|
||||
@@ -66,11 +67,11 @@
|
||||
- clang
|
||||
- cmake
|
||||
- git
|
||||
- ninja-build
|
||||
- "{{ ninja }}"
|
||||
- pkg-config
|
||||
- libgtk-3-dev
|
||||
- liblzma-dev
|
||||
- libstdc++-12-dev
|
||||
- "{{ gtk3 }}"
|
||||
- "{{ xz_libs }}"
|
||||
- "{{ cpp }}"
|
||||
state: present
|
||||
when: coding == true
|
||||
|
||||
@@ -78,10 +79,10 @@
|
||||
- name: Workstation | Linux | Software | Flutter | Android App Dependencies
|
||||
package:
|
||||
name:
|
||||
- libc6:amd64
|
||||
- libstdc++6
|
||||
- lib32z1
|
||||
- libbz2-1.0
|
||||
- "{{ c_libs }}"
|
||||
- "{{ cpp_libs }}"
|
||||
- "{{ z_libs }}"
|
||||
- "{{ bzip }}"
|
||||
state: present
|
||||
when: coding == true
|
||||
|
||||
|
||||
@@ -41,8 +41,18 @@
|
||||
- "{{ firefox }}"
|
||||
- "{{ firefox_esr }}"
|
||||
- "{{ wireless_tools }}"
|
||||
- "{{ notify_send }}"
|
||||
- "{{ fyi }}"
|
||||
- "{{ gnome_boxes }}"
|
||||
state: present
|
||||
|
||||
- name: Workstation | Linux | Software | Packages | Extra For Liberated Init Systems
|
||||
package:
|
||||
name:
|
||||
- "{{ dunst }}"
|
||||
state: present
|
||||
when: ansible_service_mgr != "systemd"
|
||||
|
||||
- name: Workstation | Linux | Software | Packages | Install From AUR
|
||||
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
|
||||
loop:
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
create: yes
|
||||
backup: yes
|
||||
loop:
|
||||
- { "key": '^[\#]?TLP_ENABLE', "value": 'TLP_ENABLE=1'}
|
||||
- { "key": '^[\#]?TLP_DEFAULT_MODE', "value": 'TLP_DEFAULT_MODE=SAV'}
|
||||
## Device Controls ##
|
||||
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_STARTUP', "value": 'DEVICES_TO_DISABLE_ON_STARTUP="bluetooth nfc wwan"'}
|
||||
# Ensure these stay commented, once the device is booted the user is in control. #
|
||||
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_STARTUP', "value": '#DEVICES_TO_ENABLE_ON_STARTUP=""'}
|
||||
@@ -85,6 +88,12 @@
|
||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT0=80'}
|
||||
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT1=60'}
|
||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT1=80'}
|
||||
# Do not let the WiFi device go DORMANT.
|
||||
- { "key": '^[\#]?WIFI_PWR_ON_AC', "value": 'WIFI_PWR_ON_AC=off'}
|
||||
- { "key": '^[\#]?WIFI_PWR_ON_BAT', "value": 'WIFI_PWR_ON_BAT=off'}
|
||||
# Do not let USB devices go dormant.
|
||||
- { "key": '^[\#]?USB_AUTOSUSPEND', "value": 'USB_AUTOSUSPEND=0'}
|
||||
|
||||
|
||||
## Enable + Start ##
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
dest: "/run/runit/services/mullvad"
|
||||
state: link
|
||||
force: true
|
||||
when: ansible_service_mgr == "runit"
|
||||
|
||||
when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix")
|
||||
|
||||
|
||||
+49
-42
@@ -5,7 +5,7 @@
|
||||
# work to change things around. Good alternative to DWM and so lightweight that
|
||||
# it doesn´t even matter if both are installed!!
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | General [1/2]
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts 01
|
||||
set_fact:
|
||||
i3_config: "settings/i3.config"
|
||||
i3_config_dir: "{{ user_user.home }}/.config/i3"
|
||||
@@ -19,31 +19,31 @@
|
||||
i3_theme02: arc-theme
|
||||
i3_theme03: numix-gtk-theme
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | General [1/2]
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts 02
|
||||
set_fact:
|
||||
i3_config_file: "{{ i3_config_dir }}/config"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | pacman
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts | non-apt
|
||||
set_fact:
|
||||
i3_theme01: htop
|
||||
i3_theme02: htop
|
||||
i3_theme03: htop
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
when: ansible_pkg_mgr != "apt"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | yay
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts | yay
|
||||
set_fact:
|
||||
i3_yay_packages:
|
||||
i3_yay_packages:
|
||||
- greybird-gtk-theme
|
||||
#- enlightenment-arc-theme
|
||||
- numix-gtk-theme
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
#- name: Workstation | Linux | Software | i3 | Facts | TBD
|
||||
#- name: Workstation | Shared | Software | i3 | i3 | Facts | TBD
|
||||
# set_fact:
|
||||
# i3_package: i3-wm
|
||||
# when: ansible_distribution in ("TBD")
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Install
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Install
|
||||
package:
|
||||
name:
|
||||
- "{{ i3_package }}"
|
||||
@@ -59,14 +59,14 @@
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Install (yay)
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Install (yay)
|
||||
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
|
||||
loop: "{{ i3_yay_packages }}"
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
become_user: "{{ aur_user }}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Config | Create Dir
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Config | Create Dir
|
||||
ansible.builtin.file:
|
||||
path: "{{ i3_config_dir }}"
|
||||
state: directory
|
||||
@@ -74,7 +74,7 @@
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Config | Copy File
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Config | Copy File
|
||||
copy:
|
||||
src: "{{ i3_config }}"
|
||||
dest: "{{ i3_config_file }}"
|
||||
@@ -104,42 +104,49 @@
|
||||
# # sudo udevadm trigger
|
||||
#
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | Check Backlights
|
||||
ansible.builtin.find:
|
||||
paths: /sys/class/backlight
|
||||
file_type: any # Options: file, directory, any
|
||||
patterns: "*" # Wildcard patterns (e.g., "*.log")
|
||||
recurse: no # Set to 'yes' for subdirectories
|
||||
register: i3_light_device_check
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light (Linux Only)
|
||||
block:
|
||||
|
||||
#- name: Display var _ DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_check }}"
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | Check Backlights
|
||||
ansible.builtin.find:
|
||||
paths: /sys/class/backlight
|
||||
file_type: any # Options: file, directory, any
|
||||
patterns: "*" # Wildcard patterns (e.g., "*.log")
|
||||
recurse: no # Set to 'yes' for subdirectories
|
||||
register: i3_light_device_check
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | Pull Backlight Name
|
||||
set_fact:
|
||||
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
||||
#- name: Display var _ DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_check }}"
|
||||
|
||||
#- name: Display var - DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_name }}"
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | Pull Backlight Name
|
||||
set_fact:
|
||||
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | udev Rules | Create
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/udev/rules.d/backlight.rules
|
||||
content: |
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
#- name: Display var - DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_name }}"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | udev Rules | Reload
|
||||
command: "{{ item }}"
|
||||
loop:
|
||||
- udevadm control --reload-rules
|
||||
- udevadm trigger
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | udev Rules | Create
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/udev/rules.d/backlight.rules
|
||||
content: |
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | udev Rules | Reload
|
||||
command: "{{ item }}"
|
||||
loop:
|
||||
- udevadm control --reload-rules
|
||||
- udevadm trigger
|
||||
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
#- name: FAIL - DELETEME
|
||||
# meta: end_play
|
||||
|
||||
Reference in New Issue
Block a user