Goal: Multi-distro Linux workstation configuration using Ansible
- At this point in time the script runs without failing on Ubuntu Server 24.04, Debian 13, CachyOS (all tested in vm)
- Test experience:
- Ubuntu Server: very clunky on 25.04 with random segfaults of fairly innocent processes (almost every session). Better on 24.04. vanilla-gnome package still has some ubuntu crap in it. Even desnappified, apt install muscle memory can get tripped up and needs flatpak. Remains to be seen how much value Ubuntu's good integration with nVidia and extensive security options really add. Conclusion: Ubuntu continues to move away from the central Linux/GNU philosophy for the desktop user
- Debian 13: works very smoothly for this type of approach. As expected.
- CachyOS: highly configured out of the box, and very well so. Some setups much simpler, since Arch and AUR provide many packages. Pacman contibuted to fastest install times. Very pleasant first time Arch experience. Configuring it seems simpler than Debian.
- My current dotfiles approach is destructive and Debian centric. It works fine on bare Debian or Ubuntu installs, but does not work well on an already highly configured offering like CachyOS. An options would be to make dotfiles setup incremental and conditional, but this is hard to do idempotently.
- Conclusions:
- Ubuntu a big disappointment, CachyOS a beast
- Nvidia setups not portable and change frequency is greater than merrits automation here. Latter also for most AI/LLM stuff.
- Automate commonly used container setup with a flexible backup/restore strategy
- basic ubuntu package installs
- factor out some distro specific vars
- libvirt support client and host
- add timing and disk usage output
- basic docker install from docker repo https://docs.docker.com/engine/install/ubuntu/
- Linux post-installation steps for Docker Engine https://docs.docker.com/engine/install/linux-postinstall/
- add ansible linting to prod level
- refactor to roles
- yadm dotfiles support
- dotfiles dependencies
- clean up vim install, plugins, etc
- remove snap
- flatpak + apps
- gnome setup with themes, fonts, extensions for Debian/Ubuntu
- refactor detection to distinguish Ubuntu vs Debian vs Arch
- split vars/debian.yml into separate ubuntu.yml and debian.yml
- refactor containerization role for Ubuntu/Debian/Arch differences
- refactor package_management role for distro-specific handling
- refactor desktop role for Ubuntu/Debian/Arch GNOME differences
- test on Ubuntu Server 24.04, Debian 13, CachyOS -> partial success!
- fix dot files mechanism
-
Test with local VMs using hostnames via qemu/libvirt for ssh and ansible:
HOST: install libnss-libvirt and enable dns resolution of vms under libvirt by appending libvirt to /etc/resolv.conf
sudo apt install libnss-libvirt sudo sed -i '/^hosts:/ s/$/ libvirt/' /etc/nsswitch.conf
CLIENT: set hostname in client
Note: You can also do all this just using ip addresses
- test-vm.sh will clone a vm, start it and attempt to connect to it via hostname, run the script asking for a sudo password, and then destroy the vm
-
Look at host-prep.sh to configure apt/http proxy such as squid host:
virsh net-dumpxml default
to find IP range for acl (also check squid access log if denied). Ensure big enough cache in squid.conf.
├── site.yml # Main playbook
├── inventory # Hosts file
├── install.sh # Run script
├── host-prep.sh # Host preparation script
├── test-vm.sh # VM testing script
├── test.yml # Test playbook
├── ansible.cfg # Ansible configuration
├── vars/ # Variables
│ ├── common_packages.yml
│ ├── common_flatpaks.yml
│ ├── debian.yml # Debian specific
│ ├── ubuntu.yml # Ubuntu specific
│ └── archlinux.yml # Arch/CachyOS specific
├── pre_tasks/ # Pre-execution tasks
│ ├── main.yml
│ ├── debian.yml
│ ├── ubuntu.yml
│ └── archlinux.yml
├── shell/ # Shell scripts and documentation
└── roles/ # Feature-focused roles
├── base/ # (empty)
├── containerization/ # Docker + container ecosystem
│ └── tasks/
│ ├── main.yml
│ ├── debian.yml
│ ├── ubuntu.yml
│ ├── archlinux.yml
│ ├── post_install.yml
│ └── log_rotation.yml
├── package_management/ # Package ecosystem management
│ └── tasks/
│ ├── main.yml
│ ├── debian.yml
│ ├── ubuntu.yml
│ ├── archlinux.yml
│ └── flatpak.yml
├── development/ # (empty)
├── desktop/ # GNOME desktop configuration
│ └── tasks/
│ ├── main.yml
│ ├── debian.yml
│ ├── ubuntu.yml
│ ├── archlinux.yml
│ ├── configuration.yml
│ ├── extensions.yml
│ ├── fonts.yml
│ └── themes.yml
└── dotfiles/ # Dotfiles management
└── tasks/
└── main.yml