Ansible DRY fixes for Vault lookups.

This commit is contained in:
2025-05-20 09:06:49 -04:00
parent fcf3687b25
commit cd5f996f39
37 changed files with 118 additions and 112 deletions
+6
View File
@@ -5,6 +5,12 @@
appdata_base_path: "~/.docker/config/appdata"
tasks:
- name: Fetch Vault secrets once
ansible.builtin.set_fact:
vault_secrets: "{{ lookup('community.hashi_vault.vault_kv2_get', 'env',
engine_mount_point='rinoa-docker', url=vault_addr,
token=vault_token_cleaned)['secret'] }}"
- name: Ensure target directories exist
ansible.builtin.file:
path: "{{ appdata_base_path }}/{{ (item | basename | regex_replace('\\.j2$', '') | regex_replace('_', '/') | regex_replace('/[^/]+$', '')) }}"