Ansible playbooks and roles to configure Linux workstations, mainly Arch Linux.
DISCLAIMER: this is a public repository, and I do not take responsibility for any lost data that may have been caused using the playbooks.
Configuration is done entirely in vars.yml which are shared across the playbooks. It does not include all possible options due to assumed defaults so it is a good idea to check roles' default vars.
Boot to archiso in UEFI mode, then install ansible and git:
pacman -Sy ansible-core gitPull playbook requirements:
ansible-pull -U https://github.com/rolowilde/devinfra.git pull.ymlSet variables and run archiso playbook:
ansible-pull -U https://github.com/rolowilde/devinfra.git -e "dev= hostname= user_password= cryptroot_passphrase=" archiso.ymlALL DATA WILL BE WIPED ON THE SPECIFIED DRIVE!
Reboot. Enter passphrase to decrypt root partition unless cryptroot was set to false. Pull requirements again and run archlinux playbook:
ansible-pull -U https://github.com/rolowilde/devinfra.git -K archlinux.ymlIt will only configure the system without installing a graphical environment or other necessities. For that, run a playbook with respective roles and/or tasks. The archlinux playbook itself can be imported as the first play of such playbook.
Following playbooks are meant to be run locally with ansible-pull:
ansible-pull -U https://github.com/rolowilde/devinfra.git -K playbook.ymlConvenience playbook to install Ansible Galaxy requirements before executing the other playbooks.
Opinionated Arch Linux installer playbook. Only supports UEFI systems and will wipe specified drive entirely for the OS. Provides minimal setup as everything else is done in the subsequent playbook/roles.
Required vars: dev (block device without /dev/ part to install), timezone, locales, hostname, user (name), user_password. root_password is optional; superuser will be locked if unspecified.
The disk is partitioned into EFI (1 GB) and the root partition. Root is formatted to BTRFS and mounted with ZSTD:1 compression level. The playbook follows current archinstall's BTRFS subvolume layout. ZRAM is assumed to be set up after boot, thus swap is not configured (zswap is disabled as recommended by the wiki).
Encryption of the root partition is enabled by default (cryptroot boolean), thus cryptroot_passphrase is required to be set. Cryptsetup is already preconfigured with optimal defaults for modern CPUs with AES instruction set, with some options being configurable.
Optimal Arch Linux configuration for workstations after booting into the live system. Sets up btrfs-maintenence timers, limits journald log size, uses bfq and kyber for IO scheduling, enables ZRAM, uses Ananicy with CachyOS rules for renicing processes, pulls dotfiles.
This alone does not provide a graphical interface that subsequent playbooks do.
Playbook to configure ASUS ROG Zephyrus G14 2022 as my daily driver for development and gaming. Uses KDE Plasma as the desktop environment and provides ASUS specific utilities for profile management, graphics switching, keyboard backlight, etc. Finally, installs a bundle of my preferred software at the end.