From 79db2419a6df305f69193a2d07985fbfb00f6082 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 20 Sep 2025 02:00:25 +0200 Subject: [PATCH] fix(Makefile, playbook.yml): ensure Ansible syntax-check has access to group_vars and clean up playbook formatting - Add all group_vars/all/*.yml as extra-vars (-e @file) in Makefile syntax-check - Use consistent quoting in playbook.yml for SOFTWARE_NAME and host_type templating Ref: https://chatgpt.com/share/68cdee8a-4e88-800f-bf62-bed66dbbb417 --- Makefile | 2 +- playbook.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6279a75f..1b077c10 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ messy-test: @echo "🧪 Running Python tests…" PYTHONPATH=. python -m unittest discover -s tests @echo "📑 Checking Ansible syntax…" - ansible-playbook playbook.yml --syntax-check + ansible-playbook -i localhost, -c local $(foreach f,$(wildcard group_vars/all/*.yml),-e @$(f)) playbook.yml --syntax-check install: build @echo "⚙️ Install complete." diff --git a/playbook.yml b/playbook.yml index 0b35ba7e..bf10da0b 100644 --- a/playbook.yml +++ b/playbook.yml @@ -1,10 +1,10 @@ -- name: Execute {{ SOFTWARE_NAME }} Play +- name: "Execute {{ SOFTWARE_NAME }} Play" hosts: all tasks: - name: "Load 'constructor' tasks" include_tasks: "tasks/stages/01_constructor.yml" - - name: "Load '{{host_type}}' tasks" - include_tasks: "tasks/stages/02_{{host_type}}.yml" + - name: "Load '{{ host_type }}' tasks" + include_tasks: "tasks/stages/02_{{ host_type }}.yml" - name: "Load 'destructor' tasks" include_tasks: "tasks/stages/03_destructor.yml" become: true \ No newline at end of file