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!
57 lines
2.3 KiB
YAML
57 lines
2.3 KiB
YAML
---
|
|
# =============================================================================
|
|
# POTE - Common Variables (All Environments)
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Git Repository (same for all environments)
|
|
# -----------------------------------------------------------------------------
|
|
pote_git_repo: "gitea@10.0.30.169:ilia/POTE.git"
|
|
pote_git_ssh_key: "{{ vault_git_ssh_key }}" # Store in Ansible Vault
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Application User
|
|
# -----------------------------------------------------------------------------
|
|
appuser_name: "poteapp"
|
|
appuser_shell: "/bin/bash"
|
|
appuser_groups: []
|
|
appuser_ssh_public_key: "{{ vault_ssh_public_key }}" # Store in Ansible Vault
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Email Configuration (same for all environments)
|
|
# -----------------------------------------------------------------------------
|
|
smtp_host: "mail.levkin.ca"
|
|
smtp_port: 587
|
|
smtp_user: "test@levkin.ca"
|
|
from_email: "test@levkin.ca"
|
|
|
|
# Secrets (store in Ansible Vault)
|
|
smtp_password: "{{ vault_smtp_password }}"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Monitoring (same tickers for all environments)
|
|
# -----------------------------------------------------------------------------
|
|
market_tickers: "NVDA,TSLA,AAPL,MSFT,GOOGL,META,AMZN,AMD,INTC,NFLX"
|
|
alert_severity: 5
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Logging
|
|
# -----------------------------------------------------------------------------
|
|
log_level: "INFO"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Deployment Options
|
|
# -----------------------------------------------------------------------------
|
|
pote_backup_before_deploy: true
|
|
pote_rollback_on_failure: true
|
|
pote_health_check_after_deploy: true
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Cron / Automation
|
|
# -----------------------------------------------------------------------------
|
|
pote_enable_cron: true
|
|
pote_daily_report_enabled: true
|
|
pote_weekly_report_enabled: true
|
|
pote_health_check_enabled: true
|
|
|