Setting up a DevOps workstation manually is a trap. You install tools one by one, configure them separately, fix dependency conflicts, and three hours later you have a working environment you can't reproduce. Rebuild the machine, start over. This project replaces all of that with a single Ansible playbook that provisions a complete DevOps environment in one command.
The Problem
A typical DevOps engineer needs: Git, Docker, Terraform, Vagrant, VirtualBox, AWS CLI, Ansible, Python, kubectl, and several more tools โ each with its own install method, each with version dependencies, each with post-install configuration. Doing this manually on a new machine takes hours. Doing it consistently across multiple machines is nearly impossible without automation.
Solution Architecture
One Command Setup
git clone https://github.com/muhammadkamrankabeer-oss/devops-workstation-automation.git
cd devops-workstation-automation
ansible-playbook -i inventory setup.yml --ask-become-pass
That's it. The playbook handles everything โ adds apt repositories, imports GPG keys, installs packages in the right order, configures services, and verifies each tool is working before moving to the next.
Idempotency โ Run It Anywhere, Anytime
Every task in the playbook is idempotent. Run it on a fresh machine: installs everything. Run it again on the same machine: changes nothing, confirms everything is already correct. Run it six months later after a partial uninstall: repairs what's missing, leaves what's intact.
- name: Install Docker
apt:
name: docker-ce
state: present # installs if missing, skips if present
- name: Add user to docker group
user:
name: "{{ ansible_user }}"
groups: docker
append: yes # idempotent โ won't duplicate
Tech Stack Installed
- Ansible โ automation engine (bootstrap installed first)
- Terraform โ IaC for cloud provisioning
- Vagrant + VirtualBox โ local VM provisioning
- AWS CLI v2 โ cloud access and management
- Docker + Docker Compose โ containerization
- Python 3 + pip + venv โ scripting and tooling
- kubectl + Helm โ Kubernetes management
Lightweight Linux Optimization
The playbook runs on Xubuntu โ a lightweight Debian-based distro designed for older hardware. I added optimization tasks that disable unnecessary services and free up RAM for the DevOps tools that actually matter:
- name: Disable unnecessary services
systemd:
name: "{{ item }}"
enabled: no
state: stopped
loop:
- bluetooth
- cups
- ModemManager
Key Lessons
- Bootstrap Ansible first, then use it to install everything else โ don't manually install tools the playbook should manage
- Pin tool versions in your playbook โ
state: latestbreaks reproducibility over time - Test on a fresh VM before trusting the playbook on real hardware โ Vagrant makes this trivial
- A reproducible workstation is worth the upfront investment โ it pays back every time you touch a new machine
What's Next
- Dotfiles management โ version-control .bashrc, .vimrc, .gitconfig
- Docker VM automation โ spin up pre-configured containers for common projects
- Jenkins CI/CD local setup included in the playbook
- GitHub Actions runner self-hosted setup