Add the compose_stack role, inventory and playbooks

One role that syncs a payload and brings the stack up, configured entirely
through stack_* variables, plus six playbooks that each demonstrate one part
of that contract. Every playbook runs standalone and is tagged with its
stack name, so site.yml --tags <stack> works.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Lucas Winther
2026-09-16 03:58:01 +02:00
co-authored by Claude Opus 5
parent 7cdf9b854b
commit 7b52e9af9e
16 changed files with 606 additions and 0 deletions
@@ -0,0 +1,20 @@
---
# Two entry points, so a playbook that must do maintenance between the payload
# landing and the stack starting can interleave its own tasks:
#
# - ansible.builtin.include_role:
# name: compose_stack
# tasks_from: sync
# - name: Run the database migration
# ...
# - ansible.builtin.include_role:
# name: compose_stack
# tasks_from: up
#
# Using the role normally (roles: - role: compose_stack) runs both, in order.
# playbooks/webapp.yml is the worked example.
- name: Sync the payload to the host
ansible.builtin.include_tasks: sync.yml
- name: Start the stack
ansible.builtin.include_tasks: up.yml