Thanks to visit codestin.com
Credit goes to github.com

Skip to content

qovert/dev_workstation

Repository files navigation

dev_workstation

An Ansible playbook for automated workstation setup.

Hobby project. Run at your own risk. Fork freely.

CI

Supported platforms

Platform Status
Fedora 41+ Primary
Fedora Silverblue 41+ Primary
macOS (Apple Silicon / Intel) Secondary
Debian / Ubuntu Untested

Quick start

Fedora

sudo dnf install ansible
ansible-galaxy collection install -r requirements.yml
ansible-playbook main.yml -i localhost, -c local --ask-become-pass

Fedora Silverblue

pip and pipx are not included in the base Silverblue image. Layer pipx onto the host first, then reboot:

sudo rpm-ostree install pipx
systemctl reboot

After rebooting, run the bootstrap script from the host (not from inside a toolbox):

bash bootstrap.sh

The script installs Ansible via pipx, installs Galaxy dependencies, and runs the playbook. It will prompt for your sudo password to handle rpm-ostree layering and Flatpak setup.

macOS

pip3 install ansible
ansible-galaxy collection install -r requirements.yml
ansible-galaxy role install -r requirements.yml
ansible-playbook main.yml -i localhost, -c local --ask-become-pass

Configuration

Personal values go in config.yml (git-ignored, not committed):

cp default.config.yml config.yml
# edit config.yml

The minimum required setting:

github_username: "your-github-username"

Alternatively, export GITHUB_USERNAME in your shell and skip config.yml entirely.

All other values in default.config.yml are reasonable defaults — override only what you need in config.yml.

What it does

All platforms

  • Installs and initialises chezmoi from github.com/<github_username>/dotfiles
  • Downloads oh-my-posh themes

Fedora

  • Bootstraps DNF Python bindings (python3-libdnf5) for Ansible on Fedora 41+
  • Adds repositories: Microsoft (PowerShell/dotnet), VS Code, 1Password, RPM Fusion (free + nonfree), Terra
  • Upgrades the core group for AppStream metadata
  • Installs DNF packages (see fedora_packages in default.config.yml)
  • Adds Flathub (system + user remotes) and installs Flatpak apps per-user

Fedora Silverblue

  • Layers a minimal set of host packages via rpm-ostree (see silverblue_host_packages in default.config.yml)
  • Creates a default Fedora toolbox and installs CLI dev tools inside it (see silverblue_toolbox_packages)
  • Adds Flathub and installs Flatpak apps per-user, including Silverblue-specific extras (VS Code, 1Password, Zed)

macOS

Feature flags

Set these in config.yml to enable/disable sections:

configure_dotfiles: true   # chezmoi setup
configure_linux: true      # Fedora/Debian tasks
configure_macos: true      # macOS tasks
configure_mas: false       # App Store (requires prior sign-in)
configure_dock: true       # macOS Dock management

Project structure

dev_workstation/
├── roles/
│   ├── packages/          # Repo setup + DNF/APT package installation
│   │   ├── tasks/
│   │   │   ├── main.yml
│   │   │   ├── fedora.yml
│   │   │   └── debian.yml   # untested
│   │   └── defaults/
│   ├── apps/              # Flatpak (Fedora) and cask/MAS (macOS)
│   │   └── tasks/
│   │       ├── main.yml
│   │       └── fedora.yml
│   ├── dotfiles/          # chezmoi install, init, apply
│   │   └── tasks/
│   └── system/            # OS-level config (macOS defaults, Dock)
│       ├── tasks/
│       └── handlers/
├── molecule/              # Integration tests (Fedora container)
├── .github/workflows/     # CI (lint + syntax + molecule)
├── main.yml               # Playbook entry point
├── default.config.yml     # Default configuration (commit this)
├── config.yml             # Personal overrides (git-ignored, create this)
├── requirements.yml       # Ansible collections and macOS roles
└── ansible.cfg

Tags

Run specific roles without executing the full playbook:

ansible-playbook main.yml -i localhost, -c local --ask-become-pass --tags packages
ansible-playbook main.yml -i localhost, -c local --ask-become-pass --tags apps
ansible-playbook main.yml -i localhost, -c local --ask-become-pass --tags dotfiles
ansible-playbook main.yml -i localhost, -c local --ask-become-pass --tags system

Linting / CI

yamllint .
ansible-lint
ansible-playbook main.yml --syntax-check
molecule test   # requires Docker

License

MIT

About

Ansible playbook for macOS and Linux workstation setup

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages