From 31f269b1f590664be2119eee659ad384f564ab07 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Sat, 13 Sep 2025 22:12:55 -0400 Subject: [PATCH] Tweaks for DAG-related items. --- .gitea/workflows/dag-config-check.yml | 2 +- playbooks/rinoa-render-dags.yml | 32 --------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/.gitea/workflows/dag-config-check.yml b/.gitea/workflows/dag-config-check.yml index bb586cb..ce509c8 100644 --- a/.gitea/workflows/dag-config-check.yml +++ b/.gitea/workflows/dag-config-check.yml @@ -49,6 +49,6 @@ jobs: - name: Validate DAGs run: | for dag in $(find ${DAGS_PATH} -type f -name "*.yaml" -a ! -name "*example*"); do - echo "=========Validating ${dag}=========" + echo "==========Validating ${dag}==========" dagu dry "${dag}" done diff --git a/playbooks/rinoa-render-dags.yml b/playbooks/rinoa-render-dags.yml index e5fc224..1d12f4c 100644 --- a/playbooks/rinoa-render-dags.yml +++ b/playbooks/rinoa-render-dags.yml @@ -19,38 +19,6 @@ | default([]) }} - - name: Pre-check Vault secrets in templates - when: dag_templates | length > 0 - block: - - name: Read each DAG template safely - ansible.builtin.slurp: - src: "{{ item }}" - loop: "{{ dag_templates }}" - register: slurped_templates - - - name: Extract Vault keys from DAG templates - ansible.builtin.set_fact: - vault_keys: >- - {{ - slurped_templates.results - | map(attribute='content') - | map('b64decode') - | map('regex_findall', - "lookup\\('community.hashi_vault.vault_kv2_get',\\s*'[^']+',\\s*engine_mount_point='[^']+',\\s*url=[^,]+,\\s*token=[^\\)]+\\)\\['secret'\\]\\['([^']+)'\\]") - | sum(start=[]) - }} - - - name: Warn if any Vault keys might be missing - loop: "{{ vault_keys }}" - ansible.builtin.debug: - msg: "Vault key '{{ item }}' will be required by templates" - - - - name: Warn if any Vault keys might be missing - loop: "{{ vault_keys }}" - ansible.builtin.debug: - msg: "Vault key '{{ item }}' will be required by templates" - - name: Render DAG templates in-place (guarded) when: dag_templates | length > 0 ansible.builtin.template: