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
+14
View File
@@ -0,0 +1,14 @@
---
- name: Bring the stack up
community.docker.docker_compose_v2:
project_src: "{{ stack_dest }}"
files: "{{ stack_files }}"
state: "{{ stack_state }}"
pull: "{{ stack_pull }}"
build: "{{ stack_build }}"
remove_orphans: true
# A compose file that interpolates ${PWD} — a common way to hand a host path to
# a sibling container — resolves it against the *invoking shell*, not the
# project directory. The module sets the process working directory but not PWD,
# so ${PWD} would silently become the SSH login directory. Set it explicitly.
environment: "{{ {'PWD': stack_dest} | combine(stack_env) }}"