mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 12:47:04 +00:00
design_assets renders the logo set only where IS_STACK_HOST holds, but the slurp in tasks/utils/design.yml ran on every swarm host, so the workers failed with 'File not found: /opt/compose/gitlab/design/logo.png' (fork run 42465517680 attempt 6, GitLab#0 job 128710892782). The slurp now runs once delegated to STACK_HOST, as the SSH host key slurp in tasks/01_config.yml does, and its result reaches every host for the platform_admin runner. 🎯 Fix: 93 % 💥 Break: 3 % 💸 Cost: – ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 90 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
733 B
Python
23 lines
733 B
Python
import unittest
|
|
|
|
from utils.cache.yaml import load_yaml_any
|
|
|
|
from . import PROJECT_ROOT
|
|
|
|
DESIGN = PROJECT_ROOT / "roles" / "web-app-gitlab" / "tasks" / "utils" / "design.yml"
|
|
|
|
|
|
class TestDesign(unittest.TestCase):
|
|
def test_the_logo_read_runs_once_on_the_stack_host(self) -> None:
|
|
block = load_yaml_any(str(DESIGN))[0]["block"]
|
|
read = next(task for task in block if "ansible.builtin.slurp" in task)
|
|
self.assertEqual(
|
|
(read.get("delegate_to"), read.get("run_once")),
|
|
("{{ STACK_HOST }}", True),
|
|
"design_assets renders the logo set only where IS_STACK_HOST holds, so a swarm worker that slurps it finds no file",
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|