Skip to content

Getting Started

Everything in this repo assumes two credentials: a Proxmox API token (to discover hosts) and a Bitwarden Secrets Manager access token (to inject secrets at container start). Get those in place and the rest follows.

Terminal window
git clone git@github.com:markkpamy/infrastructure-toolkit.git
cd infrastructure-toolkit
# Formatting + secret scanning on every commit
./utils/utils-linux/install-pre-commit.sh
./utils/utils-linux/setup-pre-commit-repo.sh
Terminal window
cd ansible
cp .env.example .env

Fill in .env. The three that matter most:

VariableWhat it is
PROXMOX_TOKEN_SECRETProxmox API token secret. Create under Datacenter → Permissions → API Tokens.
BWS_ACCESS_TOKENBitwarden machine-account token used on the controller to wrap stack restarts.
BWS_HOST_ACCESS_TOKENA separate, read-only token distributed to hosts as /etc/bws/token.

.env is gitignored, and gitleaks runs as a pre-commit hook — but the safest habit is never pasting a real secret into a tracked file in the first place.

Terminal window
# From ansible/
ansible-galaxy collection install -r collections/requirements.yml
export $(cat .env | grep -v '^#' | xargs)

Confirm the dynamic inventory can actually reach Proxmox before changing anything:

Terminal window
ansible-inventory -i inventory/proxmox.proxmox.yml --graph

You should see every VM and LXC, grouped by node and by Proxmox tag (hosts tagged docker show up as tag_docker). If that works, credentials and network path are good.

Then a real playbook in check mode:

Terminal window
ansible-playbook -i inventory/proxmox.proxmox.yml \
playbooks/system-update.yml --limit arcane --check --diff
Terminal window
# Whole fleet
ansible-playbook -i inventory/proxmox.proxmox.yml playbooks/<playbook>.yml
# One host, or a few
ansible-playbook -i inventory/proxmox.proxmox.yml playbooks/<playbook>.yml --limit arcane
ansible-playbook -i inventory/proxmox.proxmox.yml playbooks/<playbook>.yml --limit 'arcane,traefik'
# Restart every running Docker stack with BWS secrets injected
ansible-playbook -i inventory/proxmox.proxmox.yml playbooks/restart-docker-stacks.yml

Full playbook and role reference: Ansible.

Read Host Access Notes first. It records which hosts accept which user, which are only reachable via pve-dell, and the rules for making changes safely — most notably that hosts track main, so changes flow commit → push → pull on the host, never by editing files in place.

Terminal window
cd docs
npm install
npm run dev # syncs content from the repo, then serves at localhost:4321
npm test # unit tests for the sync + catalog scripts

See Editing these docs for how content gets here.