Some checks failed
CI / lint-and-test (pull_request) Successful in 1m21s
CI / ansible-validation (pull_request) Successful in 9m3s
CI / secret-scanning (pull_request) Successful in 3m19s
CI / dependency-scan (pull_request) Successful in 7m13s
CI / sast-scan (pull_request) Successful in 6m38s
CI / license-check (pull_request) Successful in 1m16s
CI / vault-check (pull_request) Failing after 6m40s
CI / playbook-test (pull_request) Successful in 9m28s
CI / container-scan (pull_request) Successful in 7m59s
CI / sonar-analysis (pull_request) Failing after 1m11s
CI / workflow-summary (pull_request) Successful in 1m11s
- Add roles/pote: Python/venv deployment role with PostgreSQL, cron jobs - Add playbooks/app/: Proxmox app stack provisioning and configuration - Add roles/app_setup: Generic app deployment role (Node.js/systemd) - Add roles/base_os: Base OS hardening role - Enhance roles/proxmox_vm: Split LXC/KVM tasks, improve error handling - Add IP uniqueness validation: Preflight check for duplicate IPs within projects - Add Proxmox-side IP conflict detection: Check existing LXC net0 configs - Update inventories/production/group_vars/all/main.yml: Add pote project config - Add vault.example.yml: Template for POTE secrets (git key, DB, SMTP) - Update .gitignore: Exclude deploy keys, backup files, and other secrets - Update documentation: README, role docs, execution flow guides Security: - All secrets stored in encrypted vault.yml (never committed in plaintext) - Deploy keys excluded via .gitignore - IP conflict guardrails prevent accidental duplicate IP assignments
21 lines
1008 B
YAML
21 lines
1008 B
YAML
---
|
|
# Helper tasks file for playbooks/app/provision_vms.yml
|
|
# Provisions all envs for a single project and adds dynamic inventory hosts.
|
|
- name: Set project definition
|
|
ansible.builtin.set_fact:
|
|
project_def: "{{ app_projects[project_key] }}"
|
|
- name: "Preflight: validate env IPs are unique within project"
|
|
ansible.builtin.assert:
|
|
that:
|
|
- (project_env_ips | length) == ((project_env_ips | unique) | length)
|
|
fail_msg: "Duplicate IPs detected in app_projects.{{ project_key }}.envs (IPs must be unique): {{ project_env_ips }}"
|
|
vars:
|
|
project_env_ips: "{{ project_def.envs | dict2items | map(attribute='value.ip') | select('defined') | map('string') | map('regex_replace', '/.*$', '') | reject('equalto', '') | list }}"
|
|
when:
|
|
- project_def.envs is defined
|
|
- (project_def.envs | length) > 0
|
|
- name: Provision each environment for project
|
|
ansible.builtin.include_tasks: provision_one_env.yml
|
|
loop: "{{ project_def.envs | dict2items }}"
|
|
loop_control:
|
|
loop_var: env_item |