From 020e7058759d168952bae37895741a39bb058ed1 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 23 Feb 2026 10:18:53 +0100 Subject: [PATCH 1/2] Fix Jinja2 escaping of zsh PROMPT in cloud-init template The zsh PROMPT string contains `%` sequences that Jinja2 interprets as template syntax. Wrap in {% raw %}...{% endraw %} to preserve the literal prompt definition. Co-Authored-By: Claude Opus 4.6 --- dropkit/templates/default-cloud-init.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dropkit/templates/default-cloud-init.yaml b/dropkit/templates/default-cloud-init.yaml index 828e1c4..6321521 100644 --- a/dropkit/templates/default-cloud-init.yaml +++ b/dropkit/templates/default-cloud-init.yaml @@ -47,7 +47,7 @@ write_files: defer: true content: | # Prompt: user@host:dir (green for normal, red after failed command) - PROMPT='%F{%(?.green.red)}%n@%m%f:%F{blue}%~%f$ ' + {% raw %}PROMPT='%F{%(?.green.red)}%n@%m%f:%F{blue}%~%f$ '{% endraw %} # History HISTFILE=~/.zsh_history From a69be1bf887553c914733226c1a3b5147a256a91 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 23 Feb 2026 14:57:30 +0100 Subject: [PATCH 2/2] Add a warning to the cloud-init jinja template --- dropkit/templates/default-cloud-init.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/dropkit/templates/default-cloud-init.yaml b/dropkit/templates/default-cloud-init.yaml index 6321521..07a7e23 100644 --- a/dropkit/templates/default-cloud-init.yaml +++ b/dropkit/templates/default-cloud-init.yaml @@ -1,4 +1,5 @@ #cloud-config +# Warning: This whole file will be evaluated by Jinja. Escape any special literals (`{{`, `{%`, `{#`). # Update and upgrade system packages package_update: true