Skip to content
/ infra Public

My self-hosted Linux environment, deployed and managed with Ansible and Podman.

License

Notifications You must be signed in to change notification settings

chrisx8/infra

Repository files navigation

chrisx8/infra

This repo is an Ansible monorepo for my self-hosted Linux environment.

Usage

Setup

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

Shell functions

Once you activate the virtualenv with ./activate, some shell aliases will be available.

Available shell aliases:

  • anplay: run ansible-playbook
  • anvault: run ansible-vault
  • chkall: run pre-commit checks on all files

Update environment

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
  • Ansible collections are unpinned, declared in requirements.yml

License

GNU GPLv3

Copyright (c) 2021-2024 Chris Xiao

About

My self-hosted Linux environment, deployed and managed with Ansible and Podman.

Resources

License

Stars

Watchers

Forks