From 81191c951fa76f034723d037c2e78b39aabee190 Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Fri, 13 Nov 2026 08:28:27 +0400 Subject: [PATCH] xmpp_cert_sync: keep Jinja out of the script's f-strings The metric line's {{cert=...}} braces were read as a Jinja expression and failed the template. Render only the settings, the rest verbatim. Assisted-by: Claude:opus-5-5 --- ansible/roles/xmpp_cert_sync/templates/xmpp-cert-sync.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/xmpp_cert_sync/templates/xmpp-cert-sync.j2 b/ansible/roles/xmpp_cert_sync/templates/xmpp-cert-sync.j2 index bf1e80d..5925269 100644 --- a/ansible/roles/xmpp_cert_sync/templates/xmpp-cert-sync.j2 +++ b/ansible/roles/xmpp_cert_sync/templates/xmpp-cert-sync.j2 @@ -12,6 +12,7 @@ KEY = "/root/.ssh/xmpp_cert_sync" KNOWN = "/root/.ssh/xmpp_cert_sync_known_hosts" STATE = "/var/lib/xmpp-cert-sync" PROM = "{{ monitoring_textfile_dir }}/xmpp_cert.prom" +{% raw %} def not_after(pem): @@ -66,3 +67,4 @@ else: with open(PROM + ".tmp", "w") as f: f.write("\n".join(lines) + "\n") os.replace(PROM + ".tmp", PROM) +{% endraw %}