You should check out Nixos. You make a config file that you can just copy over to as many machines as you want.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Yeah this is a good use case for it, if I remember right you can also trivially generate a live installer iso from the same nix configuration you'd use to run any usual updates. So you can make a custom installer for your exact configuration and copy that onto a flash drive to bootstrap you into a working environment. I think the live installer would generate something like a hardware-configuration.nix too.
You could also use nixos-anywhere + disko. This is what I use. If you have SSH and root access to a linux machine, you can live swap to a NixOS installer, load a configuration over SSH, install and reboot. It gives a similar experience to Ansible.
That or Ansible, if you will have a machine to deploy from
if you will have a machine to deploy from
You can run ansible against localhost, so you don't even need that.
You don't need a machine to deploy from. You just need a git repo and Ansible pull. It will pulldown and run playbooks against the host. (Use the self target to run it on the local machine)
Sounds like you need nixos
You could try using Hashicorp's Packer to generate images repeatably (usually more meant for cloud images though). Or NixOS (like others have mention), or Guix (like NixOS, but better in some ways, worse in others). You could make it an Ansible playbook, which would let you both make configured images, and just configure machines that already have an OS.
I do something similar with archiso, fwiw, but that only works with Arch Linux.
Would you want to change your distribution, or just keep Debian with some tools to automate?
that workflow seems fine if it works for you. seems overkill for debian but if it works i don't see anything wrong with it.
one way I do it is dpkg - l > package.txt to get a list of all install packages to feed into apt on the new machine then to setup two stow directories one for global configs. when a change is made and one for dot files in my home directory then commit and push to a personal git server.
Then when you want to setup a new system it's install minimal install then run apt install git stow
then clone your repos grab the package.txt run apt install < package.txt then run stow on each stow directory and you are back up and running after a reboot.
Use configuration tooling such as Ansible.
You also could build a image builder to build your system. You could utilize things like docker and or Ansible to repeatedly get to the same result.
Is there a free/gratis version?
Ansible? It's free software
Great! I'd no idea!
I have the exact same workflow except I have two images: one for legacy/MBR and another for EFI/GPT -- once I read your post I was glad to see I'm not alone haha!