foremanctl is a deployment tool for Foreman and Katello using Podman quadlets and Ansible, wrapping obsah for managed containerized deployments.
Two entry points:
foremanctl— production deployment; usessrc/as its data directoryforge— development and testing; usesdevelopment/as its data directory
- Deploy:
./foremanctl deploy --foreman-initial-admin-password=changeme --tuning development - Test all:
./forge test(requires a deployed VM) - Test file:
python -m pytest tests/foreman_test.py -vv - Test single:
python -m pytest tests/foreman_test.py -vv -k test_name - Lint src:
cd src; ansible-lint - Lint dev:
cd development; ansible-lint
- obsah discovery: every playbook directory needs a
metadata.obsah.yaml— without it obsah won't expose the command; it defines CLI parameters, variable types, validation, and sub-playbook includes - Internal playbooks: prefix with
_(e.g._certificate_source,_tuning) — these are composed into other playbooks, not invoked directly enabled_features: computed asflavor_features + features; never set this variable directly- Bare pytest won't work:
./forge testgenerates.tmp/ssh-configfrom the Ansible inventory before running pytest; run barepytestonly after that file exists - New roles: production roles go in
src/roles/, development-only roles indevelopment/roles/
Production playbooks (src/playbooks/): deploy/, checks/, features/, pull-images/, plus _-prefixed internal playbooks.
Development playbooks (development/playbooks/): vms/, test/, smoker/, deploy-dev/, and utilities.
Configuration lookup:
src/vars/defaults.yml— base defaultssrc/vars/flavors/— base feature sets per deployment flavor (e.g.katello.yml)src/vars/tuning/— resource profiles (development, medium, large, extra-large, extra-extra-large)src/features.yaml— canonical feature list
AI agent specifications (rules, skills, agent personas) live under .agents/.
- Development — dev environment setup, virtualenv, dependencies
- Playbooks and Roles — playbook structure, naming, metadata
- How to Add a Feature — end-to-end feature development
- Feature Metadata — YAML schema for
src/features.yaml - Check Roles — check role catalog and integration patterns
- Testing — test infrastructure, fixtures, patterns
- Parameters — installation parameter map; update when adding parameters