I have several physical machines (work laptop, personal laptop, desktop, NAS, home server) and I love trying out new Linux distros. However setting up each machine with my favorite programs every time I switch OS is a hassle. Even with dotfiles I still have to make sure I’ve installed all the right tooling and versions. That’s where Ansible comes in. It automates the setup process, getting me up and running with just one command.
My Terminal: Kitty
I use Kitty terminal for its GPU acceleration and speed. Paired with tmux, it handles multiple sessions easily. I might try Alacritty someday, but Kitty works great for now.
Code Editor: Neovim
Neovim is my go-to code editor, highly customized to my liking. My dotfiles are on github if you’re curious, and you can read about my journey to those dotfiles in vim
Essential Tools
Node.js, npm, and other JavaScript tools are part of my setup. I automate the installation of essentials like grep, curl, and git, so they’re ready to go without any hassle.
Dotfiles on Demand
My dotfiles, stored in a GitHub repo, are key. They include custom configs for everything from .zshrc to .vimrc. Ansible pulls these and places them where they need to be, with GNU Stow handling the symlinks. This way, I can always start fresh if needed.
Easy Updates
Updating is simple. I just rerun my Ansible playbook, and it fetches the latest versions of my tools.
One Command Setup
On a new machine, I clone my Ansible git repo and run a script to install Ansible. Then, I run my playbook to set everything up exactly how I like it.
Why Ansible?
Ansible’s YAML can be annoying, but its idempotency is worth it. I can run it multiple times without worrying about messing up the system. If a playbook fails, I rerun it and it picks up where it left off. Plus, it’s widely used, so I often find existing tasks for common tools.
Bottom Line
Automation with Ansible saves time and hassle. It makes setting up a new machine as easy as cloning a repo and running a command, letting me hit the ground running no matter where I am. If you haven’t tried automation yet, it’s worth it. Even if you don’t switch machines often, having a codified setup is like insurance for when you do.