## Summary This PR adds comprehensive support for deploying the **POTE** application project via Ansible, along with improvements to IP conflict detection and a new app stack provisioning system for Proxmox-managed LXC containers. ## Key Features ### 🆕 New Roles - **`roles/pote`**: Python/venv deployment role for POTE (PostgreSQL, cron jobs, Alembic migrations) - **`roles/app_setup`**: Generic app deployment role (Node.js/systemd) - **`roles/base_os`**: Base OS hardening role ### 🛡️ Safety Improvements - IP uniqueness validation within projects - Proxmox-side IP conflict detection - Enhanced error messages for IP conflicts ### 📦 New Playbooks - `playbooks/app/site.yml`: End-to-end app stack deployment - `playbooks/app/provision_vms.yml`: Proxmox guest provisioning - `playbooks/app/configure_app.yml`: OS + application configuration ## Security - ✅ All secrets stored in encrypted vault.yml - ✅ Deploy keys excluded via .gitignore - ✅ No plaintext secrets committed ## Testing - ✅ POTE successfully deployed to dev/qa/prod environments - ✅ All components validated (Git, PostgreSQL, cron, migrations) Co-authored-by: ilia <ilia@levkin.ca> Reviewed-on: #3
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
---
|
|
# Role: app_setup
|
|
# Purpose: app filesystem layout, env files, deploy script, and systemd units.
|
|
|
|
app_root: "/srv/app"
|
|
app_backend_dir: "{{ app_root }}/backend"
|
|
app_frontend_dir: "{{ app_root }}/frontend"
|
|
|
|
# Which environment file to render for this host: dev|qa|prod
|
|
app_env: dev
|
|
|
|
# Components (useful for single-repo projects)
|
|
app_enable_backend: true
|
|
app_enable_frontend: true
|
|
|
|
# Repo settings (project-driven)
|
|
app_repo_url: ""
|
|
app_repo_dest: "{{ app_root }}"
|
|
app_repo_branch: "main"
|
|
|
|
# Owner for app files
|
|
app_owner: "{{ appuser_name | default('appuser') }}"
|
|
app_group: "{{ appuser_name | default('appuser') }}"
|
|
|
|
# Ports
|
|
app_backend_port: 3001
|
|
app_frontend_port: 3000
|
|
|
|
# Commands (Node defaults; override per project as needed)
|
|
app_backend_install_cmd: "npm ci"
|
|
app_backend_migrate_cmd: "npm run migrate"
|
|
app_backend_start_cmd: "npm start"
|
|
|
|
app_frontend_install_cmd: "npm ci"
|
|
app_frontend_build_cmd: "npm run build"
|
|
app_frontend_start_cmd: "npm start"
|
|
|
|
# Arbitrary environment variables for the env file
|
|
app_env_vars: {}
|
|
|