From b62023152694796f072c13cafdd750df3f895652 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 5 Jan 2024 15:57:18 +0100 Subject: [PATCH] Fix rendering conf twice --- ctctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctctl b/ctctl index 2b47bf2..660ecdd 100755 --- a/ctctl +++ b/ctctl @@ -607,6 +607,7 @@ ctctl_render_templates(){ gomplate "${GOMPLATE_COMMON_ARGS[@]}" --context "${VAR_FILES[@]}" -i "[[ . | toYAML ]]" > ${CONFIG} # And render it again so we can replace any templated values in the config itself gomplate "${GOMPLATE_COMMON_ARGS[@]}" --context ${VAR_FILES} -f ${CONFIG} -o ${CONFIG} + gomplate "${GOMPLATE_COMMON_ARGS[@]}" --context ${VAR_FILES} -f ${CONFIG} -o ${CONFIG} GOMPLATE_COMMON_ARGS+=(--context .=file://${CONFIG}) echo "Redering bundles with gomplate ${GOMPLATE_COMMON_ARGS[@]} ${GOMPLATE_BUNDLE_ARGS[@]} ${GOMPLATE_OUT_ARGS[@]}" @@ -661,7 +662,6 @@ ctctl_render_templates(){ gomplate "${GOMPLATE_COMMON_ARGS[@]}" --context "${VAR_FILES[@]}" -i "[[ . | toYAML ]]" > ${CONFIG} # And render it again so we can replace any templated values in the config itself gomplate "${GOMPLATE_COMMON_ARGS[@]}" --context ${VAR_FILES} -f ${CONFIG} -o ${CONFIG} - # Render it twice so we can reference 2 levels of templates in variables gomplate "${GOMPLATE_COMMON_ARGS[@]}" --context ${VAR_FILES} -f ${CONFIG} -o ${CONFIG} # First, cleanup any previously rendered files