NEW: Complete Ansible role for automated POTE deployment Files Added: ============ 📁 ansible/ ├── README.md - Overview and usage ├── roles/pote/defaults/main.yml - ⭐ 200+ variables defined ├── group_vars/ │ ├── all.yml - Common variables │ ├── development.yml - Dev environment (branch: dev) │ ├── staging.yml - QA environment (branch: qa) │ └── production.yml - Prod environment (branch: main) ├── inventory.example.yml - Example inventory └── vault.example.yml - Example secrets 📄 ANSIBLE_INTEGRATION.md - Complete integration guide What Ansible Needs to Know: ============================ ✅ Git repository & branch (per environment) ✅ Application user & paths ✅ Python & system dependencies ✅ Database configuration (per environment) ✅ Email/SMTP settings ✅ Monitoring configuration ✅ Cron/automation schedules ✅ Deployment options ✅ Security settings ✅ Feature flags ✅ Environment-specific overrides Variable Categories (11): ========================== 1. Project basics (5 vars) 2. User & paths (7 vars) 3. Python & dependencies (3 lists) 4. Database (8 vars) 5. Email/SMTP (6 vars) 6. Monitoring (2 vars) 7. Logging (2 vars) 8. Cron/automation (7 vars) 9. Deployment (6 vars) 10. Security (4 vars) 11. Feature flags (4 vars) Integration: ============ ✅ Compatible with base_os role ✅ Multi-environment support (dev/qa/prod) ✅ Branch-based deployment (dev→qa→main) ✅ Ansible Vault for secrets ✅ Sensible defaults for everything ✅ Minimal required config (3 vars!) Usage: ====== ansible-playbook deploy-pote.yml --limit development ansible-playbook deploy-pote.yml --limit staging ansible-playbook deploy-pote.yml --limit production Ready for your Ansible auto-configure system!
77 lines
3.0 KiB
YAML
77 lines
3.0 KiB
YAML
---
|
|
# =============================================================================
|
|
# POTE - Production Environment
|
|
# =============================================================================
|
|
|
|
environment: "production"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Git Branch
|
|
# -----------------------------------------------------------------------------
|
|
git_branch: "main"
|
|
pote_git_branch: "main"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Server
|
|
# -----------------------------------------------------------------------------
|
|
# Set in inventory
|
|
# ansible_host: 10.0.10.95
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Database
|
|
# -----------------------------------------------------------------------------
|
|
db_host: "localhost"
|
|
db_port: 5432
|
|
db_name: "potedb"
|
|
db_user: "poteuser"
|
|
db_password: "{{ vault_db_password_prod }}"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Email Recipients (production)
|
|
# -----------------------------------------------------------------------------
|
|
report_recipients: "test@levkin.ca"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Features (all enabled)
|
|
# -----------------------------------------------------------------------------
|
|
pote_feature_email_reports: true
|
|
pote_feature_market_monitoring: true
|
|
pote_feature_disclosure_correlation: true
|
|
pote_feature_pattern_detection: true
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Deployment
|
|
# -----------------------------------------------------------------------------
|
|
pote_run_tests: false # Don't run full test suite in prod
|
|
pote_run_smoke_tests: true # But do run smoke tests
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Cron
|
|
# -----------------------------------------------------------------------------
|
|
pote_daily_report_time: "0 6" # 6 AM
|
|
pote_weekly_report_time: "0 8 0" # Sunday 8 AM
|
|
pote_health_check_time: "0 */6" # Every 6 hours
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Logging
|
|
# -----------------------------------------------------------------------------
|
|
log_level: "INFO"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Backup (longer retention)
|
|
# -----------------------------------------------------------------------------
|
|
pote_backup_retention_days: 90
|
|
pote_backup_before_deploy: true
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Security (stricter in production)
|
|
# -----------------------------------------------------------------------------
|
|
pote_env_file_mode: "0600"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Maintenance
|
|
# -----------------------------------------------------------------------------
|
|
pote_db_maintenance_enabled: true
|
|
pote_db_maintenance_schedule: "0 2 * * 0" # Weekly, Sunday 2 AM
|
|
|