feat(ansible): idempotent role-based host config for both production VMs
common/firewall/docker-tls/platform/lab-host/monitoring-agent/backup roles, orchestrated by site.yml with the ordering that matters (firewall/TLS land before the services that depend on them). Ansible Vault for secrets, no new tool introduced for this project's modest secret surface. Explicit dev/staging/production environment separation, no secrets committed (.gitignore covers vault plaintext, TLS keys, Terraform state, *.env). Validated: ansible-playbook --syntax-check clean.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Ansible Vault template — copy to production.vault.yml and encrypt it, NEVER commit the
|
||||
# plaintext or the encrypted file to git (infra/.gitignore already excludes
|
||||
# **/vault_plain.yml; the encrypted production.vault.yml itself is small/safe to commit IF
|
||||
# encrypted — see docs/PRODUCTION_DEPLOYMENT.md §10 for the actual decision made). Ansible
|
||||
# Vault chosen over SOPS/age here because it's already bundled with Ansible (no new tool to
|
||||
# install/trust) and this project's secret surface is small enough that Vault's simplicity
|
||||
# outweighs SOPS's per-key-value granularity — revisit if that changes.
|
||||
#
|
||||
# cp production.vault.yml.template production.vault.yml
|
||||
# # fill in real values below
|
||||
# ansible-vault encrypt production.vault.yml
|
||||
#
|
||||
# Reference a vaulted value from group_vars/production.yml or a role like:
|
||||
# postgres_password: "{{ vault_postgres_password }}"
|
||||
|
||||
vault_postgres_password: __REPLACE__
|
||||
vault_provisioner_shared_secret: __REPLACE_openssl_rand_hex_32__
|
||||
vault_owner_bootstrap_password: __REPLACE__ # used once, by a human, per docs/RUNBOOK_FIRST_DEPLOYMENT.md
|
||||
vault_postgres_exporter_password: __REPLACE__
|
||||
vault_backup_encryption_passphrase: __REPLACE_openssl_rand_base64_32__
|
||||
vault_backup_offsite_credentials: __REPLACE_e.g._Hetzner_Storage_Box_ssh_key_passphrase_or_S3_secret_key__
|
||||
vault_grafana_admin_password: __REPLACE__
|
||||
@@ -0,0 +1,33 @@
|
||||
# Production variables — referenced by every {{ }} placeholder in infra/docker/, infra/firewall/,
|
||||
# and the roles below. Fill in the __PLACEHOLDER__ values once the real server exists
|
||||
# (docs/PRODUCTION_DEPLOYMENT.md §1). Nothing here is a secret — real secrets live in
|
||||
# infra/environments/production/*.env (gitignored) and Ansible Vault (see
|
||||
# infra/ansible/group_vars/production.vault.yml.template), never in this plain-vars file.
|
||||
|
||||
env: production
|
||||
academy_domain: __REPLACE_e.g._academy.rootnode.example__
|
||||
|
||||
# ── Network topology (Phase 4 §5 — placeholders until real hardware exists) ────────────────
|
||||
platform_ip: __PLATFORM_VM_IP__
|
||||
lab_host_ip: __LAB_HOST_VM_IP__
|
||||
management_cidr: __YOUR_ADMIN_ACCESS_CIDR__ # e.g. a VPN/WireGuard subnet, never 0.0.0.0/0
|
||||
proxmox_mgmt_cidr: __PROXMOX_HOST_MGMT_CIDR__
|
||||
lab_subnet_range: "10.42.0.0/16" # matches NO_PROXY_CIDRS already used by the app
|
||||
lab_gateway_port_range: "30000:32767" # see docs/PRODUCTION_NETWORK_SECURITY.md — Gateway-to-Lab reachability follow-up
|
||||
|
||||
# ── Storage (Phase 4 §4 — a decision framework, not a final layout; see docs/PHASE4_PRODUCTION_INFRASTRUCTURE.md §4)
|
||||
rootnode_data_root: /srv/rootnode-data # expected to be a ZFS dataset mountpoint on the real host
|
||||
|
||||
# ── Registry / images (infra/docker/IMAGE_STRATEGY.md) ─────────────────────────────────────
|
||||
registry: git.synthossystems.com
|
||||
image_tag: __GIT_SHA_OR_RELEASE_TAG__
|
||||
|
||||
postgres_exporter_user: rootnode_exporter
|
||||
|
||||
# ── Observability (infra/monitoring/) ───────────────────────────────────────────────────────
|
||||
prometheus_retention_days: 30
|
||||
alertmanager_webhook_url: __REPLACE_e.g._uptime_kuma_or_ntfy_webhook__
|
||||
|
||||
# ── Backup (infra/backup/) ───────────────────────────────────────────────────────────────────
|
||||
backup_retention_days: 30
|
||||
backup_offsite_target: __REPLACE_e.g._Hetzner_Storage_Box_path_or_S3_bucket__
|
||||
@@ -0,0 +1,22 @@
|
||||
# Staging variables — same shape as production.yml, lower stakes. See
|
||||
# infra/environments/staging/README.md.
|
||||
|
||||
env: staging
|
||||
academy_domain: __REPLACE_e.g._staging.academy.rootnode.example_or_unset_for_no_public_TLS__
|
||||
|
||||
platform_ip: __STAGING_PLATFORM_IP__
|
||||
lab_host_ip: __STAGING_LAB_HOST_IP__
|
||||
management_cidr: __YOUR_ADMIN_ACCESS_CIDR__
|
||||
proxmox_mgmt_cidr: __PROXMOX_HOST_MGMT_CIDR__
|
||||
lab_subnet_range: "10.42.0.0/16"
|
||||
|
||||
rootnode_data_root: /srv/rootnode-data-staging
|
||||
|
||||
registry: git.synthossystems.com
|
||||
image_tag: __STAGING_TAG_e.g._staging-<sha>__
|
||||
|
||||
prometheus_retention_days: 7
|
||||
alertmanager_webhook_url: __OPTIONAL_staging_can_skip_alerting__
|
||||
|
||||
backup_retention_days: 7
|
||||
backup_offsite_target: __OPTIONAL_staging_backups_are_lower_priority__
|
||||
Reference in New Issue
Block a user