This repo is an Ansible monorepo for my self-hosted Linux environment.
First, install Python 3.13 and uv.
Then, install repo dependencies, including Ansible, Ansible collections, ansible-lint
, pre-commit hooks, and other Python packages:
source ./activate -u
After initial setup, simply activate the virtualenv when working in this repo:
source ./activate
Once you activate the virtualenv with ./activate
, some shell aliases will be available.
Available shell aliases:
anplay
: runansible-playbook
anvault
: runansible-vault
chkall
: run pre-commit checks on all files
Re-running the repo setup will update Python packages and Ansible collections:
source ./activate -u
Dependencies are declared in various places:
- Python dependencies are pinned by minor versions, declared in
requirements.txt
- Re-run setup after updating dependency pins
- Pre-commit hooks are pinned by exact versions, declared in
.pre-commit-config.yaml
- Update by running
pre-commit autoupdate
- Update by running
- Ansible collections are unpinned, declared in
requirements.yml
Copyright (c) 2021-2024 Chris Xiao