Skip to content

sianachi/MyDevSetup

Repository files navigation

Ansible Dev Environment

Provisions a developer machine (Ubuntu/Debian, Fedora/RHEL, or macOS) with Git, Zsh + Oh My Zsh + Powerlevel10k + fzf + thefuck, Python + pipx, Node.js, Docker, and Neovim + AstroNvim.

Setup

# 1. Install Ansible (apt / dnf / brew install ansible)
# 2. Install the Galaxy collections this playbook uses
ansible-galaxy collection install -r requirements.yml

# 3. Edit your details
vim group_vars/all.yml        # git name/email, pipx tools, etc.
vim inventory/hosts.yml       # target machines

Run

ansible-playbook site.yml --ask-become-pass           # everything
ansible-playbook site.yml --tags "zsh,neovim"         # subset
ansible-playbook site.yml --check --diff              # dry run

Test in Docker

A disposable Ubuntu 24.04 container for trying the playbook without touching your real machine:

docker compose up -d --build
docker compose exec ansible-dev bash
# inside the container:
ansible-playbook site.yml --skip-tags docker

The project is bind-mounted into the container, so host edits are immediately visible. Skip the docker role because the Docker daemon can't run inside an unprivileged container.

Run the prebuilt image

The CI pipeline publishes an image to GitHub Container Registry. To pull and run it:

sudo docker run -it ghcr.io/sianachi/mydevsetup zsh

Install

A helper script wraps the full setup (Galaxy collections + playbook):

./install.sh

Layout

site.yml              # master playbook
requirements.yml      # Galaxy collections
inventory/hosts.yml   # target machines
group_vars/all.yml    # shared variables
docker/Dockerfile     # test container image
docker-compose.yml    # test container orchestration
roles/
  common/  git/  python/  node/  docker/  neovim/
  zsh/                # zsh + OMZ + p10k + autocomplete +
                      # syntax-highlighting + fzf + thefuck,
                      # one task file per tool under tasks/

Gotchas

  • community.general not found — run ansible-galaxy collection install -r requirements.yml. Ansible validates module references at parse time, so OS-gated tasks (e.g. community.general.homebrew on Linux) still need the collection present.
  • externally-managed-environment — Ubuntu 24.04 / Debian 12 block system pip (PEP 668). The python role installs pipx instead; add global CLI tools to pipx_packages in group_vars/all.yml.
  • Multiple Ansible installs on macOS (brew + pipx + pip) — make sure ansible-galaxy and ansible-playbook resolve to the same one: which ansible ansible-galaxy && ansible-galaxy collection list | grep community.general.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors