From 65b66f712dd15b69d7870a667d40d94efff525f7 Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Tue, 22 Sep 2026 23:36:42 +0530 Subject: [PATCH] Quote every template block in the Site vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deploy failed on 'YAML parsing failed: missing quotes around a template block'. vars/hopsngrains.yml had been edited to derive its names from the web address, but the two derived values were unquoted and YAML reads a leading brace as a flow mapping, so the file did not parse at all. The names now derive from a title (the domain) with every interpolation quoted, which is what nginx-menu did and what makes the file copyable for another Site: host menu., container menu-app.<title>, network <container>_net, data /var/lib/menu-app.<title>. Resolving the vars offline gives exactly the values the docs promise, including /app/config/hopsngrains.site.json inside the image. The old edit derived from host, so app_root would have been /var/lib/menu.hopsngrains.com — the directory the old static menus were served from. --- ansible/vars/hopsngrains.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ansible/vars/hopsngrains.yml b/ansible/vars/hopsngrains.yml index 921110a..95826cc 100644 --- a/ansible/vars/hopsngrains.yml +++ b/ansible/vars/hopsngrains.yml @@ -2,10 +2,15 @@ # Hops n Grains. Its name, tagline, icon, categories and menus live on the # server under app_root and are edited in the admin; config/hopsngrains.site.json # only seeds the theme. This file says where the Site runs and what it answers. -host: menu.hopsngrains.com +# +# Every value that interpolates a template is quoted: YAML reads a leading `{` +# as a flow mapping, which is the parse error Ansible reports as "missing quotes +# around a template block". +title: hopsngrains.com +host: 'menu.{{ title }}' -docker_container: menu-app.hopsngrains.com +docker_container: 'menu-app.{{ title }}' docker_network: '{{ docker_container }}_net' # Everything the app writes — data/ and the untracked site.env. -app_root: /var/lib/menu-app.hopsngrains.com +app_root: '/var/lib/menu-app.{{ title }}'