From 0aae5fdb1fcd424dadb037c99ee5ae255ded2943 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 7 Feb 2025 12:46:14 -0800 Subject: [PATCH] Tweak coreos block in greenwave config to avoid newline issues Well, I hope, anyway. This is a nightmare to predict/test because jinja is weird and ansible puts it in a weird non-standard mode. But this does the same thing as the product_versions macro we use for all other releases - just leave out all attempts to avoid blank lines. It *might* cause blank lines in some states, but I *think* I found (while testing product_versions) that blank lines don't break the parsing. I can't find anywhere in the YAML spec where it actually defines when a block sequence *ends*, but as a matter of fact it seems like whatever parser is being used here doesn't choke on blank lines. My ideal goal here is that, whatever entries are present or absent based on the conditionals, we get a clean block sequence with each entry on its own line and no blank lines, but this seems to be *incredibly* hard to get jinja to do. Signed-off-by: Adam Williamson --- roles/openshift-apps/greenwave/templates/fedora.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/openshift-apps/greenwave/templates/fedora.yaml.j2 b/roles/openshift-apps/greenwave/templates/fedora.yaml.j2 index aa7cc6c131..29e36fbb26 100644 --- a/roles/openshift-apps/greenwave/templates/fedora.yaml.j2 +++ b/roles/openshift-apps/greenwave/templates/fedora.yaml.j2 @@ -481,9 +481,9 @@ rules: id: "bodhiupdate_bodhipush_coreos" product_versions: - fedora-{{ FedoraRawhideNumber }} -{% if FedoraBranched -%} +{% if FedoraBranched %} - fedora-{{ FedoraBranchedNumber }} -{%- endif %} +{% endif %} - fedora-{{ FedoraCycleNumber }} decision_contexts: - bodhi_update_push_testing_critical-path-coreos_critpath