ansible-ubuntu-setting
Automate an Ubuntu desktop setup using Ansible. This repository provides role-based playbooks that install packages, deploy dotfiles, configure Docker, install developer fonts, and apply GNOME preferences so your desktop configuration is version-controlled and repeatable.
Quick facts
- Target: Ubuntu 24.04+ (desktop)
- Control machine: any system with Git and Ansible installed
Repository layout
local.ymlโ main playbook (roles are tagged so you can run subsets)ansible.cfgโ project Ansible configurationgroup_vars/โexample.ymlprovided; copy toUbuntu.ymland customizeroles/โ role implementations (packages, dotfiles, docker, fonts, gnome)scripts/inventory.pyโ optional dynamic inventoryMakefileโ convenience โฆ
ansible-ubuntu-setting
Automate an Ubuntu desktop setup using Ansible. This repository provides role-based playbooks that install packages, deploy dotfiles, configure Docker, install developer fonts, and apply GNOME preferences so your desktop configuration is version-controlled and repeatable.
Quick facts
- Target: Ubuntu 24.04+ (desktop)
- Control machine: any system with Git and Ansible installed
Repository layout
local.ymlโ main playbook (roles are tagged so you can run subsets)ansible.cfgโ project Ansible configurationgroup_vars/โexample.ymlprovided; copy toUbuntu.ymland customizeroles/โ role implementations (packages, dotfiles, docker, fonts, gnome)scripts/inventory.pyโ optional dynamic inventoryMakefileโ convenience targets (make run,make lint)CONTRIBUTING.md,LICENSEโ contribution and license guidance.github/workflows/โ CI for markdown and Ansible/YAML linters
Quick start
- Clone the repository and change into it:
git clone https://github.com/sydasif/ansible-ubuntu-setting.git
cd ansible-ubuntu-setting
- Copy the example group variables and edit them for your environment:
cp group_vars/example.yml group_vars/Ubuntu.yml
# edit group_vars/Ubuntu.yml (ansible_user, package lists, dotfiles_repo, etc.)
- Run the full playbook (example using the included dynamic inventory):
ansible-playbook -i scripts/inventory.py local.yml --ask-become-pass
Or use the Makefile shortcut:
make run
Run specific roles only
Roles in local.yml are tagged. Use --tags to run a subset:
# run only fonts and docker roles
ansible-playbook local.yml --tags "fonts,docker"
# run only the dotfiles role
ansible-playbook local.yml --tags dotfiles
Customize
- Edit
group_vars/Ubuntu.ymlto change package lists, dotfiles repository URL, or GNOME preferences. - Keep secrets out of the repository; use Ansible Vault or an external secret store.
Idempotency
Roles are written to be idempotent. Re-running the playbook should converge the system to the desired state without repeating already-applied changes.
Contributing & CI
See CONTRIBUTING.md for contribution guidelines. This repository includes GitHub Actions workflows that run yamllint and ansible-lint on pushes and pull requests.
License
This project includes an MIT LICENSE file.
References
- Dotfiles example: sydasif/dotfiles
- Inspiration: LearnLinuxTV Ansible tutorials